nutritious-oyster-4341
08/28/2025, 3:13 PM{"message": "AudioMixer: stream <async_generator object BackgroundAudioPlayer._play_task.<locals>._gen_wrapper at 0x11fcb9470> timeout, ignoring", "level": "WARNING", "name": "livekit", "pid": 68599, "job_id": "AJ_B4qaWACN9rJT", "timestamp": "2025-08-28T15:13:15.425550+00:00"}tall-airline-16756
08/28/2025, 3:13 PMtall-airline-16756
08/28/2025, 3:14 PMAudioMixer tries to grab audio frames from a stream that’s already been removed but is still wrapping up its cleanup.
Here’s why it happens: the BackgroundAudioPlayer._play_task sets up a generator wrapper (_gen_wrapper) to handle volume changes on audio sources. When a sound finishes playing, the stream gets removed from the AudioMixer before the generator fully closes. So, during the next check, the AudioMixer tries to get a frame from that removed stream, which triggers the timeout warning.
The good news is this warning is harmless and can’t be turned off directly. But if you want, you can tweak the stream_timeout_ms parameter when you initialize things to adjust how quickly the timeout happens. Just keep in mind, this won’t completely get rid of the warning since it’s part of the normal cleanup process.
If the warning is cluttering up your logs, a handy trick is to filter it out at the application level by setting up your logger to ignore messages that say "AudioMixer: stream ... timeout, ignoring."
Sources: examples/video-stream/audio_wave.py | livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/tts.py | External data and RAG | LiveKit Docs