clever-optician-10225
12/15/2025, 10:04 PMtall-airline-16756
12/15/2025, 10:05 PMtall-airline-16756
12/15/2025, 10:05 PMagent.say can be queued so it plays only after the user finishes speaking — yes.
What you can do
• Outgoing speech is automatically queued when the user is speaking if allow_interruptions=True (default). The agent will wait until the user's turn ends (VAD/STT or a custom turn detector) before playing queued speech.
• To force immediate replacement of agent speech, call session.interrupt().
• To coordinate explicitly, listen for the user's turn end (e.g., UserStateChangedEvent where new_state == "listening") or use the SpeechHandle returned by say() to manage timing and playback.
If you want, tell me which SDK/lang you're using (JavaScript, Python, or server-side) and I’ll provide a short code example.
Sources: Turn detection and interruptions | LiveKit Docs | Agent speech and audio | LiveKit docsclever-optician-10225
12/15/2025, 10:11 PMtall-airline-16756
12/15/2025, 10:11 PMagent.say(allow_interruptions = true) while the user is speaking, the message will be queued and played after the user stops speaking (turn end detected via VAD/STT or your turn detector).
If you’d like, I can show a short code example for JavaScript or Python to illustrate using SpeechHandle or listening for UserStateChangedEvent.