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
+14 -1
View File
@@ -44,7 +44,6 @@ W = config.WAKE_WORDS
("tighten that bolt", (False, "")),
("the bolt on the door", (False, "")),
("I was bold", (False, "")), # the mishearing alone isn't a wake word
("assistant set a timer", (False, "")), # "assistant" needs the "hey"
("boltage is high", (False, "")),
("", (False, "")),
])
@@ -52,6 +51,20 @@ def test_find_wake(said, expected):
assert find_wake(said, W) == expected
@pytest.mark.parametrize("said, expected", [
("assistant set a timer", (True, "assistant set a timer")),
("What's the weather, assistant?", (True, "What's the weather, assistant?")),
("can the assistant turn it up", (True, "can the assistant turn it up")),
("Hey assistant. Set a timer", (True, "Set a timer")), # at the start: stripped as before
("Assistant.", (True, "")), # on its own: wait for the request
("um, assistant", (True, "")),
("my assistants are busy", (False, "")), # whole words only
("tighten that bolt", (False, "")),
])
def test_find_wake_anywhere(said, expected):
assert find_wake(said, W, config.ANYWHERE_WAKE_WORDS) == expected
# ── voice-activity detection ────────────────────────────────────────────────
def seg(**kw):