chore(voice): tidy wake_word — drop dead SURFACES, unused np, stale docstring

This commit is contained in:
Brooklyn Nicholson 2026-06-27 11:38:55 -05:00 committed by Teknium
parent edb12bf423
commit c01c3f4b28
No known key found for this signature in database

View file

@ -1,10 +1,10 @@
"""Wake-word ("Hey Hermes") detection — hands-free session trigger for the CLI.
"""Wake-word ("Hey Hermes") detection — hands-free session trigger.
A lightweight, always-on hotword listener that fires a callback when a wake
phrase is spoken the "Hey Siri" / "Alexa" pattern. The CLI uses it to start a
fresh voice session without touching the keyboard: say the wake word, Hermes
opens the mic, captures one utterance via the existing voice pipeline, and
answers.
phrase is spoken the "Hey Siri" / "Alexa" pattern. Shared by the CLI, TUI, and
desktop GUI (one of them owns it, gated by ``wake_surface_enabled``): say the
wake word, Hermes opens a fresh session and captures voice via the existing
pipeline, then answers.
Two engines, both fully on-device (no audio leaves the machine for detection):
@ -56,9 +56,6 @@ _DEFAULTS: Dict[str, Any] = {
"start_new_session": True,
}
# Surfaces that can host the listener. "auto" means whichever one is running.
SURFACES = ("cli", "tui", "gui")
def load_wake_word_config() -> Dict[str, Any]:
"""Return the ``wake_word`` config section, shape-guarded to a dict."""
@ -347,7 +344,7 @@ class WakeWordDetector:
def _run(self) -> None:
try:
sd, np = _import_audio()
sd, _ = _import_audio()
except (ImportError, OSError) as e:
logger.error("wake word: audio libraries unavailable: %s", e)
return