diff --git a/changelog/2955.fixed.md b/changelog/2955.fixed.md new file mode 100644 index 000000000..431eafc44 --- /dev/null +++ b/changelog/2955.fixed.md @@ -0,0 +1 @@ +- Fixed audio mixer not being stopped on pipeline cancellation, causing 100% CPU usage after call disconnect. diff --git a/src/pipecat/transports/base_output.py b/src/pipecat/transports/base_output.py index 15eb99f3a..1471e06b3 100644 --- a/src/pipecat/transports/base_output.py +++ b/src/pipecat/transports/base_output.py @@ -504,6 +504,10 @@ class BaseOutputTransport(FrameProcessor): await self._cancel_clock_task() await self._cancel_video_task() + # Stop audio mixer so it doesn't keep generating frames after cancellation. + if self._mixer: + await self._mixer.stop() + async def handle_interruptions(self, _: InterruptionFrame): """Handle interruption events by restarting tasks and clearing buffers.