Add docs for passing the used wake word to the voice_assistant (#3651)

This commit is contained in:
Jesse Hills 2024-03-06 07:41:24 +13:00 committed by GitHub
parent 6d1ed9878e
commit 0ca8a1868e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -35,6 +35,7 @@ Configuration variables:
e.g. ``https://github.com/esphome/micro-wake-word-models/raw/main/models/okay_nabu.json``. e.g. ``https://github.com/esphome/micro-wake-word-models/raw/main/models/okay_nabu.json``.
- **on_wake_word_detected** (*Optional*, Automation): An automation to perform when the wake word is detected. - **on_wake_word_detected** (*Optional*, Automation): An automation to perform when the wake word is detected.
The ``wake_word`` phrase from the model manifest is provided as a ``std::string`` to any actions in this automation.
The below two options are provided by the JSON file, but can be overridden in YAML. The below two options are provided by the JSON file, but can be overridden in YAML.
@ -100,6 +101,7 @@ Example usage
on_wake_word_detected: on_wake_word_detected:
then: then:
- voice_assistant.start: - voice_assistant.start:
wake_word: !lambda return wake_word;
See Also See Also

View File

@ -97,6 +97,8 @@ Listens for one voice command then stops.
Configuration variables: Configuration variables:
- **silence_detection** (*Optional*, boolean): Enable silence detection. Defaults to ``true``. - **silence_detection** (*Optional*, boolean): Enable silence detection. Defaults to ``true``.
- **wake_word** (*Optional*, string): The wake word that was used to trigger the voice assistant
when using on-device wake word such as :doc:`/components/micro_wake_word`.
Call ``voice_assistant.stop`` to signal the end of the voice command if ``silence_detection`` is set to ``false``. Call ``voice_assistant.stop`` to signal the end of the voice command if ``silence_detection`` is set to ``false``.