Fix _stop_current_speech doesn’t cancel LLM/TTS services.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user