agents
agents copied to clipboard
BackgroundAudioPlayer cannot restart after being closed
Bug Description
Hi Team,
In livekit-agents/livekit/agents/voice/background_audio.py,
method aclose closes:
await self._audio_mixer.aclose()
await self._audio_source.aclose()
But the start doesn't re-initialise them.
Our current workaround is to re-create the instance, but it'd be nice if this can be fixed.
Expected Behavior
The _audio_mixer and _audio_source should be initialised in start instead of __init__.
Reproduction Steps
.
Operating System
Any
Models Used
No response
Package Versions
[email protected]
Session/Room/Call IDs
No response
Proposed Solution
Additional Context
No response
Screenshots and Recordings
No response