Refactor wake phrase handling: introduce REQUIRE_WAKE_WORD configuration, update documentation, and adjust assistant behavior for improved user experience.
This commit is contained in:
@@ -56,11 +56,18 @@ MIC_DEVICE = _device(os.environ.get("MIC_DEVICE", ""))
|
||||
SPEAKER_DEVICE = _device(os.environ.get("SPEAKER_DEVICE", ""))
|
||||
|
||||
# ── wake phrases ────────────────────────────────────────────────────────────
|
||||
# With REQUIRE_WAKE_WORD off (the default) the mic itself is the activation:
|
||||
# every utterance the local detector passes on is treated as a request, and
|
||||
# whatever is said near an open mic gets answered. Set it to true to go back
|
||||
# to needing a phrase before each request.
|
||||
REQUIRE_WAKE_WORD = _flag("REQUIRE_WAKE_WORD", "false")
|
||||
|
||||
# Heard through the server's speech-to-text, so these are matched against
|
||||
# *text*. A phrase counts only near the start of what was said ("hey bolt,
|
||||
# what's the time"), not buried in a sentence ("tighten that bolt"). Speech
|
||||
# recognisers often write "Bolt" as "bolts"/"volt"/"bold"; those spellings
|
||||
# only count after "hey"/"ok", where they can't be ordinary words.
|
||||
# only count after "hey"/"ok", where they can't be ordinary words. Only used
|
||||
# when REQUIRE_WAKE_WORD is on (a phrase said anyway is still stripped).
|
||||
|
||||
WAKE_WORDS = [w.strip().lower() for w in os.environ.get(
|
||||
"WAKE_WORDS",
|
||||
|
||||
Reference in New Issue
Block a user