future-motorcycle-75259
04/10/2026, 7:14 PMtall-airline-16756
04/10/2026, 7:14 PMtall-airline-16756
04/10/2026, 7:14 PMmin_endpointing_delay and max_endpointing_delay can add hundreds to thousands of ms while the agent waits to confirm the user stopped speaking (defaults can be up to several seconds for low-confidence endpoints).
• Using conservative VAD-only endpointing or high VAD sensitivity extends listening time.
• Non-streaming TTS usage or misconfigured chunking: if your TTS provider is invoked in batch mode, playback will wait until the full audio is ready.
• Infrastructure issues: CPU throttling (e.g., burstable instances running out of credits), network latency, or cold starts on free/build plans can add seconds.
• Misordered pipeline steps or extra processing between STT → LLM → TTS that delays forwarding audio frames.
How TTS output is played in the room
• The agent pipeline outputs TTS as an AsyncIterable of audio frames; those frames are consumed and published to the agent’s output track incrementally so playback in the room begins as soon as the first chunks arrive.
• If you observe full-response waits, it usually means a non-streaming TTS method is being used or the pipeline is buffering frames before publishing.
Quick actions to reduce delay
1. Lower min_endpointing_delay (try 200–300 ms) if occasional interruptions are acceptable.
2. Use dynamic/semantic turn detection (LiveKit turn detector) to shorten waits while avoiding false cutoffs.
3. Ensure your TTS provider and SDK are used in streaming mode (don’t synthesize entire blobs before publishing).
4. Check VAD sensitivity and switch from VAD-only to STT-based endpointing if helpful.
5. Monitor agent metrics (e.g., eou_delay, endpointing events) and check host CPU/network and cold-start behavior.
If you’d like, share:
• your AgentSession turn detection settings (values for min_endpointing_delay / max_endpointing_delay),
• whether you use VAD-only or STT endpointing, and
• which TTS provider/method you’re calling (streaming vs batch).
I can then point out the likeliest culprit and specific settings to change.
Sources: Pipeline nodes and hooks | LiveKit Documentation | Using a transformer to improve end of turn detection | LiveKit | Agents Framework | livekit/livekit_composite | DeepWiki | Agent speech and audio | LiveKit Documentation | Build Your First AI Voice Agent in Python: Complete Tutorial | LiveKit, with interactive elementsfuture-motorcycle-75259
04/10/2026, 7:22 PMtall-airline-16756
04/10/2026, 7:22 PMAsyncIterable of audio frames). If your code buffers the whole file, that causes the wait.
• Check endpointing settings: share your min_endpointing_delay / max_endpointing_delay and whether you use VAD-only or STT endpointing. Endpointing is the most common cause of multi-second delays.
• Inspect agent metrics/logs for eou_delay, TTS start timestamp, and first audio-frame published timestamp to see where the time is spent.
• Confirm there are no infrastructure issues (cold starts or CPU throttling) causing additional delay.
If you want, paste these details:
• min_endpointing_delay and max_endpointing_delay
• whether endpointing is VAD-only or STT
• the Azure TTS method/SDK call you use (streaming WebSocket/streaming SDK vs. batch synthesize)
I’ll point to the exact code spots to change and the best parameter values based on what you share.
, with interactive elements