I'm getting text transciptions of what my agent sa...
# ask-ai
b
I'm getting text transciptions of what my agent says, but not of what the user says. How do I get transcriptions of user speech? Here is my session setup code:session = AgentSession( stt=inference.STT(model="assemblyai/universal-streaming", language="en"), # default STT from LiveKit's agent builder webpage llm=inference.LLM(model="openai/gpt-4o"), tts=inference.TTS( model="cartesia/sonic-3", voice="6ccbfb76-1fc6-48f7-b71d-91ac6298247b" # Tessa: Cartesia's more expressive voice agent ), turn_detection=MultilingualModel(), vad = ctx.proc.userdata["vad"], preemptive_generation=True, )
t
Thanks for reaching out, Mat. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — this is a clear question. You’ve already configured
stt
in your
AgentSession
(good first step). The reason you’re seeing transcriptions of the agent but not the user is that user speech transcriptions are emitted on a different event:
user_input_transcribed
. To receive what the user says you need to subscribe to that event on your
AgentSession
. What to do next 1. Add an event handler for
user_input_transcribed
on your
AgentSession
. 2. Inspect
transcript.alternatives[0].text
and
transcript.is_final
to get final vs interim text. Python example
Copy code
@session.on("user_input_transcribed")
def on_user_transcription(transcript):
    if transcript.is_final:
        print("User said (final):", transcript.alternatives[0].text)
    else:
        print("User said (interim):", transcript.alternatives[0].text)
Quick checklist if you still don’t see anything • Confirm the user’s microphone audio is being sent from the client to the room. • Confirm the agent/session is connected and subscribed to the user’s audio track(s). • Verify you aren’t filtering out
user_input_transcribed
events elsewhere in your code. • STT is already configured correctly in your snippet — just ensure the live audio stream is available. If you’d like, share: • Whether audio is working for other features (e.g., live audio in the room), • Any logs showing event names being received, and I’ll help narrow down why
user_input_transcribed
might not be firing. Sources: Speech-to-text (STT) models overview | LiveKit Documentation | Transcriber | LiveKit Documentation