From 39a77431e245d8d7ae33fcda3b9d89b2113b025f Mon Sep 17 00:00:00 2001 From: 0xbyt4 <35742124+0xbyt4@users.noreply.github.com> Date: Tue, 10 Mar 2026 21:03:12 +0300 Subject: [PATCH] fix: use shutdown() instead of cancel() on CLI exit to release persistent audio stream --- cli.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cli.py b/cli.py index beb242aef..e7e89d938 100755 --- a/cli.py +++ b/cli.py @@ -5678,12 +5678,13 @@ class HermesCLI: self.agent.flush_memories(self.conversation_history) except Exception: pass - # Cancel active voice recording - if hasattr(self, '_voice_recorder') and self._voice_recorder and self._voice_recording: + # Shut down voice recorder (release persistent audio stream) + if hasattr(self, '_voice_recorder') and self._voice_recorder: try: - self._voice_recorder.cancel() + self._voice_recorder.shutdown() except Exception: pass + self._voice_recorder = None # Clean up old temp voice recordings try: from tools.voice_mode import cleanup_temp_recordings