From 605968a639a51dc5781b08aede720e3c99b60aac Mon Sep 17 00:00:00 2001 From: Xin Wang Date: Fri, 6 Feb 2026 08:05:33 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20=5Fstop=5Fcurrent=5Fspeech=20doesn?= =?UTF-8?q?=E2=80=99t=20cancel=20LLM/TTS=20services.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/duplex_pipeline.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/duplex_pipeline.py b/core/duplex_pipeline.py index 299f8aa..b80cc36 100644 --- a/core/duplex_pipeline.py +++ b/core/duplex_pipeline.py @@ -669,6 +669,12 @@ class DuplexPipeline: await self._current_turn_task except asyncio.CancelledError: pass + + # Ensure underlying services are cancelled to avoid leaking work/audio + if self.tts_service: + await self.tts_service.cancel() + if self.llm_service and hasattr(self.llm_service, 'cancel'): + self.llm_service.cancel() self._is_bot_speaking = False self._interrupt_event.clear()