Updates to the assistants overall abilities, like always listening, and only responding on messages when activated.

This commit is contained in:
TMN AI
2026-09-30 20:25:15 -06:00
parent 8bcd539b31
commit 34b2d302f9
10 changed files with 82 additions and 7 deletions
+3 -1
View File
@@ -70,6 +70,7 @@ class Assistant:
log: Callable[[str], None] = print,
clock: Callable[[], float] = time.monotonic,
wake_words=None,
anywhere_words=None,
verbose: bool = False,
):
self._transcription = transcription
@@ -79,6 +80,7 @@ class Assistant:
self.log, self.clock, self.verbose = log, clock, verbose
self.tools = tools or Tools(log=log)
self.wake_words = wake_words or config.WAKE_WORDS
self.anywhere_words = config.ANYWHERE_WAKE_WORDS if anywhere_words is None else anywhere_words
self.segmenter = Segmenter(config.VAD_RMS_THRESHOLD, config.VAD_START_FRAMES,
config.VAD_SILENCE_END_SEC, config.MIN_UTTERANCE_SEC,
config.MAX_UTTERANCE_SEC)
@@ -152,7 +154,7 @@ class Assistant:
if not text:
return
self._check_deadline()
woke, rest = find_wake(text, self.wake_words)
woke, rest = find_wake(text, self.wake_words, self.anywhere_words)
if self.state == "idle":
if not woke:
if self.verbose: