I am very excited by the new wake word feature as part of year of the voice and have managed to set up a working demo. However I find it limiting that the reply comes over the device that hears the command. This means that as I transition from google home minis to home assistant I am either going to have to buy expensive speakerphones + raspberry pis. Or build large ESP32s with built-in speakers. Most of my rooms already have some sort of media player in them.
Ideally I would like to have an ESP32 microphone in every room (which could also to other tasks like presence detection) and then stream the voice assistant responses directly to the much superior media players which already exist in each room.
+1 The ESP32 devices I’m using have crappy speakers. Would like to be able to control where the reply is sent, depending on the device receiving the command.
Edit: I’m sorry about the spam, didn’t realise there was a vote option… shame on me.
Hello, I bought one of the M5Stack AtomS3U and was wondering if you had a yaml that got it working with HA for a voice control unit with wake words? I am brand new at using the ESP devices and bought this as it was available from Amazon, but also bought some boards and items to build some customs units to learn this new skill I found a esp32-s3-box-3.yaml but it doesn’t work as it references different pin out, I believe… So if you have a working one, I would love to get a copy. Comparing yours and the online will also help me to learn how yaml coding works with these as I am also learning all new skills in that arena also. thank you in advance.
I’ve had luck with Esphome, but the speech detection wants esp_adf which got me into trouble with ESP32s3. I just figured out that esp32/framework/sdkconfig_options needs to be an “S3” option or else there’s liable to be a build issue.
This is a work in progress; the mic doesn’t seem to do anything. But the light and button are working .
EspHome, in general, is super cool. You (probably) won’t regret picking up a few boards, even if you are having a rocky start now.
[edit: My (long neglected) config YAML was wrong in a different way; I changed it back to report the real stumbling block I ran into.]
[edit #2: I replaced the non-compiling YAML and error; that’s not really useful to the community.]
As I mentioned in the other thread, the instructions from here work. Of course you need to adopt the device into ESPHome and after that replace the auto-generated config with the actual config.
Note that the instructions say
but I found that I must have neither media_player nor speaker in my voice_assistant configuration, otherwise the response will play on both the voice assistant hardware and the desired media player.
FYI, I have been playing with just such a scenario. Here is the code:
- alias: Route Voice to Sonos Speakers
description: Route voice responses to Sonos speakers - Office and Guest Room only
mode: parallel
triggers:
- trigger: conversation
command: what time is it
id: time
conditions: []
variables:
sonos_mapping:
assist_satellite.office_assist_assist_satellite: media_player.office_sonos
assist_satellite.guest_assist_assist_satellite: media_player.guest_sonos
responding_satellite:
"{% for entity_id, sonos in sonos_mapping.items() %}\n {%
if states(entity_id) == 'responding' %}\n {{ entity_id }}\n {% endif %}\n{%
endfor %}\n"
target_sonos:
"{{ sonos_mapping.get(responding_satellite, 'media_player.office_sonos')
}}"
actions:
- set_conversation_response: ""
- variables:
was_playing: "{{ states(target_sonos) == 'playing' }}"
- action: tts.speak
metadata: {}
data:
cache: false
media_player_entity_id: "{{ target_sonos }}"
message: The current time is {{ now().strftime('%I:%M %p') }}
target:
entity_id: tts.piper
- delay:
seconds: 0
- if:
- condition: template
value_template: "{{ was_playing }}"
then:
- action: media_player.media_play
target:
entity_id: "{{ target_sonos }}"
The key was to: - set_conversation_response: "" and that eliminated the secondary response after the Sonos TTS announce. This is sandbox, so I was just working with a canned response to make sure I was actually taking over the pipeline.