You're seeing that warning because the OpenAI TTS audio is taking longer to synthesize than the agent session expects. To avoid playing delayed or stale speech, LiveKit clears (flushes) the audio emitter when generation falls behind real-time.
Why it happens:
• The TTS response latency (network, model load, or complex input) exceeds the agent's audio timeline.
• When generation is too slow, audio packets would arrive late, so the emitter is flushed to keep playback timely.
What you can do:
• Shorten or split long TTS inputs so each request generates faster.
• Reduce network latency between your agent and the TTS service.
• Add retry/backoff or queueing in your agent so it waits slightly longer for TTS before flushing, if acceptable for your use case.
• Use a faster TTS model or scale parallel TTS workers if high concurrency is causing delays.
If you want, share an example TTS payload or the timing (how long generation takes) and I can suggest which of these changes will help most.
Sources:
Universal Egress |
OpenAI TTS plugin guide | LiveKit docs |
Agent speech and audio | LiveKit docs