Fix _stop_current_speech doesn’t cancel LLM/TTS services.
This commit is contained in:
@@ -670,6 +670,12 @@ class DuplexPipeline:
|
|||||||
except asyncio.CancelledError:
|
except asyncio.CancelledError:
|
||||||
pass
|
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._is_bot_speaking = False
|
||||||
self._interrupt_event.clear()
|
self._interrupt_event.clear()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user