Skip to content

Commit be509e5

Browse files
authored
Merge pull request #4245 from kollaikal-rupesh/fix/mixer-cancel-cleanup
Stop audio mixer on pipeline cancellation
2 parents 6eccd16 + 67ee802 commit be509e5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/pipecat/transports/base_output.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,10 @@ async def cancel(self, frame: CancelFrame):
512512
await self._cancel_clock_task()
513513
await self._cancel_video_task()
514514

515+
# Stop audio mixer so it doesn't keep generating frames after cancellation.
516+
if self._mixer:
517+
await self._mixer.stop()
518+
515519
async def handle_interruptions(self, _: InterruptionFrame):
516520
"""Handle interruption events by restarting tasks and clearing buffers.
517521

0 commit comments

Comments
 (0)