happy-mouse-590
05/04/2026, 7:53 PMtall-airline-16756
05/04/2026, 7:53 PMtall-airline-16756
05/04/2026, 7:53 PMRoomOptions (recommended in modern Python SDKs). It mirrors your settings: background noise cancellation, disable auto-close, and enable transcription.
from livekit.agents import room_io
from livekit.plugins import noise_cancellation
room_options = room_io.RoomOptions(
# enable audio/video inputs as needed
audio_input=room_io.AudioInputOptions(
noise_cancellation=noise_cancellation.BVC(), # background voice cancellation
),
video_input=True, # set to False if you don't want video
# text/transcription output options
text_output=room_io.TextOutputOptions(
transcription_enabled=True,
sync_transcription=False, # set True if you need real-time sync
),
participant_identity="user_123", # optional: target participant identity
close_on_disconnect=False, # disable auto-close to allow cleanup
delete_room_on_close=False, # do not delete room automatically
)
await session.start(
agent=agent,
room=ctx.room,
room_options=room_options,
)
If you prefer to keep separate input/output objects (older style), I can show the equivalent, or if you want different noise-cancellation settings or participant targeting, tell me what you want and I’ll adapt the snippet.
Sources: Agent session | LiveKit Documentation, with interactive elementshappy-mouse-590
05/04/2026, 7:57 PMtall-airline-16756
05/04/2026, 7:57 PMsync_transcription does — thanks for the clear question.
• sync_transcription=True (sync mode): transcribed text is synchronized with the agent’s spoken audio in real time (word-by-word). If the agent is interrupted, the transcription is truncated to match what was actually spoken.
• sync_transcription=False (async mode): transcriptions are delivered to the client as soon as they’re available, without aligning to live audio playback. This can reduce perceived latency but you lose word-level audio/text sync.
When to use which:
• Use True if you need tight audio↔️text alignment (e.g., live captions or highlighting words as spoken).
• Use False if lower latency is more important than per-word synchronization (e.g., quick post-utterance transcripts).
If you tell me your use case (live captions, post-call transcript, low-latency UX), I can recommend the best setting.
Sources: Text and transcriptions | LiveKit Documentation, with interactive elements