agents icon indicating copy to clipboard operation
agents copied to clipboard

BackgroundAudioPlayer cannot restart after being closed

Open wdhwg001 opened this issue 2 weeks ago • 1 comments

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

wdhwg001 avatar Nov 24 '25 03:11 wdhwg001