wake_phrases
diapason.speech.wake_phrases
¶
Wake-word phrase matching (Diapason-style text gate for « Diapason »).
build_wake_pattern(variants=None, prefixes=None)
¶
Match wake phrase at the start of an utterance.
has_wake_word(text, *, pattern=None)
¶
True if text opens with an address to Diapason.
strip_wake_word(text, *, pattern=None)
¶
Remove leading wake address. « Diapason, ouvre YouTube » → « ouvre YouTube ».