fix: suppress verbose logs during streaming TTS, improve hallucination filter, stop continuous mode on errors

- Add _vprint() helper to suppress log output when stream_callback is active
- Expand Whisper hallucination filter with multi-language phrases and regex pattern for repetitive text
- Stop continuous voice mode when agent returns a failed result (e.g. 429 rate limit)
This commit is contained in:
0xbyt4 2026-03-06 01:51:10 +03:00
parent 3a1b35ed92
commit b00c5949fc
3 changed files with 130 additions and 70 deletions

5
cli.py
View file

@ -4242,6 +4242,11 @@ class HermesCLI:
if result and result.get("failed") and not response:
error_detail = result.get("error", "Unknown error")
response = f"Error: {error_detail}"
# Stop continuous voice mode on persistent errors (e.g. 429 rate limit)
# to avoid an infinite error → record → error loop
if self._voice_continuous:
self._voice_continuous = False
_cprint(f"\n{_DIM}Continuous voice mode stopped due to error.{_RST}")
# Handle interrupt - check if we were interrupted
pending_message = None