mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-26 01:01:40 +00:00
fix: use shutdown() instead of cancel() on CLI exit to release persistent audio stream
This commit is contained in:
parent
eb79dda04b
commit
39a77431e2
1 changed files with 4 additions and 3 deletions
7
cli.py
7
cli.py
|
|
@ -5678,12 +5678,13 @@ class HermesCLI:
|
||||||
self.agent.flush_memories(self.conversation_history)
|
self.agent.flush_memories(self.conversation_history)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
# Cancel active voice recording
|
# Shut down voice recorder (release persistent audio stream)
|
||||||
if hasattr(self, '_voice_recorder') and self._voice_recorder and self._voice_recording:
|
if hasattr(self, '_voice_recorder') and self._voice_recorder:
|
||||||
try:
|
try:
|
||||||
self._voice_recorder.cancel()
|
self._voice_recorder.shutdown()
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
self._voice_recorder = None
|
||||||
# Clean up old temp voice recordings
|
# Clean up old temp voice recordings
|
||||||
try:
|
try:
|
||||||
from tools.voice_mode import cleanup_temp_recordings
|
from tools.voice_mode import cleanup_temp_recordings
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue