mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
feat(voice): "Say <stop-phrase> to end the voice chat" notice on voice-mode start (CLI/TUI/desktop, i18n)
One owner for the wording: voice_stop_hint() in tools/voice_mode.py — sources the phrase from voice.stop_phrases (first entry) so a custom phrase renders correctly, and returns "" when the feature is disabled (stop_phrases: []) so no surface shows a hint. - CLI: printed in /voice on output (style-matched dim notice). - TUI: voice.toggle action=on now carries stop_hint; the Ink client renders it in the "Voice mode enabled" block (older gateways omit the field — no hint, no crash). - Desktop: the renderer voice loop never touches tools/voice_mode.py, so the phrase is read from config (voice.stop_phrases → $voiceStopPhrase store, seeded in use-hermes-config) and shown as an info toast when a voice conversation starts. i18n: en/ja/zh/zh-hant/ar.
This commit is contained in:
parent
9e5f1b619c
commit
6fdfdc1597
18 changed files with 201 additions and 3 deletions
9
cli.py
9
cli.py
|
|
@ -12283,6 +12283,15 @@ class HermesCLI(CLIAgentSetupMixin, CLICommandsMixin, CLIBillingMixin):
|
|||
_ptt_display = self._voice_record_key_label()
|
||||
_cprint(f"\n{_ACCENT}Voice mode enabled{tts_status}{_RST}")
|
||||
_cprint(f" {_DIM}{_ptt_display} to start/stop recording{_RST}")
|
||||
# Spoken-stop hint sourced from voice.stop_phrases (first entry); the
|
||||
# helper returns "" when stop phrases are disabled — show no hint then.
|
||||
try:
|
||||
from tools.voice_mode import voice_stop_hint
|
||||
_stop_hint = voice_stop_hint()
|
||||
except Exception:
|
||||
_stop_hint = ""
|
||||
if _stop_hint:
|
||||
_cprint(f" {_DIM}{_stop_hint}{_RST}")
|
||||
_cprint(f" {_DIM}/voice tts to toggle speech output{_RST}")
|
||||
_cprint(f" {_DIM}/voice off to disable voice mode{_RST}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue