I have LiveKit hooked up as a client in the browse...
# ask-ai
b
I have LiveKit hooked up as a client in the browser. The transcription of the user's audio track is not being emitted and received by the web client. How can I fix this?
✅ 1
t
Thanks for reaching out, Brian. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’ll help you troubleshoot why the user audio transcription isn’t being emitted to your web client. Quick checklist to verify (start here): • Agent/STT configured: Confirm the agent has an STT instance configured. If no STT is attached, transcriptions won’t be produced. • Transcription output not disabled: Ensure you did not disable text output (e.g.,
text_output=False
in Python
RoomOptions
or
outputOptions.transcriptionEnabled: false
in Node). Text output is enabled by default—verify it wasn’t turned off. • Realtime model limitation: If you’re using a realtime model, note realtime models may not emit interim transcripts. You may only get final transcripts after processing, or you may need a separate STT plugin for true live interim transcripts. • Frontend handler registered: Make sure the browser client registers a text stream handler for
lk.transcription
. Without this, transcription streams won’t be delivered to your UI. If you haven’t already, add a handler like this in the web client:
Copy code
room.registerTextStreamHandler('lk.transcription', async (reader, participantInfo) => {
  const message = await reader.readAll();
  const transcribedTrackId = reader.info.attributes['lk.transcribed_track_id'];
  const isFinal = reader.info.attributes['lk.transcription_final'] === 'true';
  console.log(`Transcription from ${participantInfo.identity}`, { message, transcribedTrackId, isFinal });
});
If that handler is present but you still see nothing, please answer these quick diagnostic questions so I can narrow it down: 1. Are you seeing any other text streams/messages in the client (i.e., is
registerTextStreamHandler
working for other topics)? 2. Which agent/STT are you using (Realtime model, external STT plugin, or built-in pipeline)? 3. Do you see transcription events in server-side logs or in the LiveKit Agents Playground when testing the same flow? 4. Do you get final transcripts only (delayed) or nothing at all? Reply with those answers and any relevant snippets of your AgentSession/RoomOptions config and client handler code, and I’ll provide targeted next steps. Sources: Text and transcriptions | LiveKit Documentation | Agent session | LiveKit Documentation | examples/voice_agents | livekit/livekit_composite | DeepWiki | Build Your First AI Voice Agent in Python: Complete Tutorial | LiveKit | Realtime models overview | LiveKit Documentation, with interactive elements
b
• Transcription is clearly working since I'm receiving the SIP participant and agent's transcriptions. • I'm using the
useTranscription
hook • I don't get the user's transcription at all
t
Thanks — helpful details. Since SIP and agent transcriptions arrive and you use
useTranscriptions
, this points to a user-specific issue. Let’s narrow it down and fix it. Please check these items and reply with any findings: 1. Audio track published ◦ Confirm the user’s audio track is actually published to the Room (not muted or unpublished). Is the user’s participant showing an active audio track in the participant list? 1. Transcribed track ID on streams ◦ Are any incoming
lk.transcription
streams present that have
lk.transcribed_track_id
matching the user’s track ID? If you can, log
reader.info.attributes
inside your
useTranscriptions
handler. 1. Hook filtering or local-only behavior ◦ Ensure your
useTranscriptions
usage isn’t filtering out the local participant. Share the small snippet of how you call/use the hook so I can check for implicit filters. 1. Agent/STT mapping ◦ Confirm the agent is configured to transcribe the user’s participant (not just SIP/agent channels). Which STT or realtime model is the agent using? 1. Server-side / observability ◦ Do server-side logs or Agent Observability show transcription events for the user? If yes, delivery is failing; if no, agent/STT isn’t receiving the audio. If you prefer, paste: • the
useTranscriptions
/ text stream handler code, • a short excerpt of AgentSession/RoomOptions (showing
text_output
/
transcriptionEnabled
and STT config), • and whether the missing user is the local participant or a remote participant. I’ll use that to give exact next steps. Sources: Text and transcriptions | LiveKit Documentation | Agent session | LiveKit Documentation | Streamline troubleshooting with Agent Observability | LiveKit | [Flutter iOS] SoundWaveformWidget / AudioVisualizerWidget Not Working (Miss..., with interactive elements
b
• User's audio is coming through 100% •
useTranscription
is doing zero filtering • STT is not mapped to any particular track, so it's auto-subscribing to all tracks
t
Thanks — helpful confirmation. Since SIP and agent transcriptions arrive,
useTranscriptions
isn’t filtering, STT auto-subscribes, and the user audio is published, let’s narrow the last possibilities. Please check and reply with the quick results below: 1. Confirm local vs remote ◦ Is the missing transcription for the local participant (the browser user) or a remote user? 1. Log incoming transcription attributes ◦ Add a console log inside your
useTranscriptions
handler to print
reader.info.attributes
for every
lk.transcription
stream. Do you see any streams whose
lk.transcribed_track_id
equals the user’s track ID? 1. Confirm subscription state for the user track ◦ Verify the publication is subscribed (server-side/agent sees audio). On the agent side, confirm the agent is receiving audio frames from that track. 1. Check text output sync/settings ◦ Confirm
text_output
/
outputOptions.transcriptionEnabled
is true and sync_transcription is not suppressing user transcripts. If
sync_transcription
is enabled, try disabling it to see raw transcription events. 1. Reproduce in Playground ◦ Test the same browser user flow in the LiveKit Agents Playground. Do user transcriptions appear there? If you can paste these three short snippets I’ll inspect them: • the
useTranscriptions
/ text stream handler code • the AgentSession/RoomOptions (showing
text_output
/
transcriptionEnabled
and
sync_transcription
if present) • whether the missing participant is local or remote I’ll give exact next steps once I can see those. Sources: Text and transcriptions | LiveKit Documentation | How to Set Up Speech-to-Text Input with Text-Only Output in LiveKit Agents | Live conversations with AI using ChatGPT and WebRTC | LiveKit | Agents (Python) | livekit/livekit_composite | DeepWiki | Agent session | LiveKit Documentation, with interactive elements
b
The missing transcription is for the local participant yes
t
Thanks — that helps a lot. Since the missing transcription is for the local participant, try these targeted checks and paste the requested snippets if it still fails. 1) Confirm agent is receiving the local audio frames • On the agent/server side, verify the agent actually receives audio from the local participant (not just that the browser plays audio). Check agent-side logs or observability for incoming audio frames for that participant identity. 2) Ensure the agent is configured to process the local participant • If you have any
RoomIO
,
participant_filter
, or
participant_identity
settings, confirm they don’t exclude the local participant. By default agents subscribe to all tracks, but custom filters can exclude the local user. 3) Check text output / sync flags • Confirm
text_output=True
(Python) or
outputOptions.transcriptionEnabled: true
(Node). • If
sync_transcription
is set, try disabling it to see raw/un-synced transcriptions (some local transcripts can be suppressed when synchronized). 4) Pre-connect / pre-buffered audio • If you use pre-connect audio, ensure the agent handles
lk.agent.pre-connect-audio-buffer
so that pre-connect audio is sent to STT. 5) Verify identity/metadata • Ensure the local participant has a stable
identity
(not empty) — transcriptions are attributed to participant identity. If you still don’t see the local transcripts, please paste these three short snippets: • Your AgentSession / RoomOptions (showing
text_output
/
outputOptions
/
sync_transcription
/ any
participant_filter
or
RoomIO
settings). • A minimal excerpt of the
useTranscriptions
/
registerTextStreamHandler
usage you have in the browser. • Confirmation the missing participant is the local browser user (you already said yes — reaffirm if the identity used is the same as the participant identity shown in agent logs). With those I’ll pinpoint the exact flag or config causing the local participant transcripts to be omitted. Sources: Text and transcriptions | LiveKit Documentation | Agents Framework | livekit/livekit_composite | DeepWiki | How to set a fixed participant for agent audio processing | Livestream Mode | Agent speech and audio | LiveKit Documentation, with interactive elements