From 7585864113c6c2363cf82c389d8e276e10f34a4c Mon Sep 17 00:00:00 2001 From: Rupesh Date: Mon, 6 Apr 2026 01:51:29 -0700 Subject: [PATCH 1/2] Stop audio mixer on pipeline cancellation to prevent 100% CPU usage --- changelog/2955.fixed.md | 1 + src/pipecat/transports/base_output.py | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 changelog/2955.fixed.md 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. From 67ee802772c714d5e2a0c2ca2a1e2e1e784a33be Mon Sep 17 00:00:00 2001 From: Rupesh Date: Mon, 6 Apr 2026 21:36:53 -0700 Subject: [PATCH 2/2] Remove changelog entry per review feedback --- changelog/2955.fixed.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 changelog/2955.fixed.md diff --git a/changelog/2955.fixed.md b/changelog/2955.fixed.md deleted file mode 100644 index 431eafc44..000000000 --- a/changelog/2955.fixed.md +++ /dev/null @@ -1 +0,0 @@ -- Fixed audio mixer not being stopped on pipeline cancellation, causing 100% CPU usage after call disconnect.