livekit.agents: flush audio emitter due to slow au...
# ask-ai
p
livekit.agents: flush audio emitter due to slow audio generation what is the reason for this ?
t
Thanks for reaching out, mithun. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thank you for reaching out! The log message "flush audio emitter due to slow audio generation" is a helpful indicator that the audio system noticed the synthesized audio is being created a bit slower than real-time. To keep everything running smoothly and avoid any delays in playback, the system gently clears the audio buffer. This usually happens within the
AudioEmitter
class, especially during text-to-speech (TTS) streaming. It can occur when the audio generation is slowed down by things like a busy backend, network delays, or slower TTS models. To make sure you get timely audio output, the system measures the delay and clears the buffer as needed, even if it means letting go of some data, so your experience stays responsive and seamless. Sources: tests/test_tts.py