Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable wake-word select for m5stack-atom-echo #29

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 34 additions & 2 deletions m5stack-atom-echo/m5stack-atom-echo.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
substitutions:
name: m5stack-atom-echo
friendly_name: M5Stack Atom Echo
micro_wake_word_model: okay_nabu # alexa, hey_jarvis, hey_mycroft are also supported

esphome:
name: ${name}
Expand Down Expand Up @@ -53,6 +52,7 @@ speaker:
voice_assistant:
id: va
microphone: echo_microphone
# micro_wake_word: mww #not yet upstreamed from home-assistant-voice-pe
speaker: echo_speaker
noise_suppression_level: 2
auto_gain: 31dBFS
Expand Down Expand Up @@ -279,6 +279,32 @@ switch:
- switch.turn_off: timer_ringing

select:
- platform: template
name: "Active wake word"
icon: "mdi:bullhorn"
entity_category: config
options:
Copy link
Contributor Author

@HarvsG HarvsG Oct 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? should add a "DISABLED" option that is selected when "Wake word engine location" is "In home assistant"? This would help prevent a situation where a user selects a wake word that differs from the HomeAssistant wake word

- "OK Nabu"
- "Hey Jarvis"
- "Hey Mycroft"
optimistic: true
restore_value: true
on_value:
then:
- lambda: |-
if (x == "OK Nabu") {
id(okay_nabu).enable();
id(hey_mycroft).disable();
id(hey_jarvis).disable();
} else if (x == "Hey Mycroft") {
id(okay_nabu).disable();
id(hey_mycroft).enable();
id(hey_jarvis).disable();
} else if (x == "Hey Jarvis") {
id(okay_nabu).disable();
id(hey_mycroft).disable();
id(hey_jarvis).enable();
}
- platform: template
entity_category: config
name: Wake word engine location
Expand Down Expand Up @@ -323,9 +349,15 @@ file:
file: https://github.com/esphome/wake-word-voice-assistants/raw/main/sounds/timer_finished.wav

micro_wake_word:
# id: mww # not yet supported
on_wake_word_detected:
- voice_assistant.start:
wake_word: !lambda return wake_word;
vad:
models:
- model: ${micro_wake_word_model}
- model: okay_nabu
id: okay_nabu
- model: hey_jarvis
id: hey_jarvis
- model: hey_mycroft
id: hey_mycroft
Loading