#can someone guide me through the process of using a custom wake word on a voice pe?
1 messages · Page 1 of 1 (latest)
Is the model you have for MicroWakeWord? where did you get it from?
micro wake word
here is the yaml code i have currently (which fails)
esphome:
name: ha-voice-0a6f10
friendly_name: Home Assistant Voice 0a6f10
esp32:
board: esp32-s3-devkitc-1
framework:
type: esp-idf
logger:
api:
encryption:
key:
ota:
- platform: esphome
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
i2s_audio:
- id: i2s_bus
i2s_lrclk_pin: GPIO42
i2s_bclk_pin: GPIO41
microphone:
- platform: i2s_audio
id: pe_mic
i2s_din_pin: GPIO2
adc_type: external
pdm: false
channel: left
micro_wake_word:
id: mww
microphone:
id: pe_mic
models:
- model:
path: /config/esphome/voice_models/computer.json
voice_assistant:
id: va
microphone: pe_mic
micro_wake_word: mww
use_wake_word: true
use triple backticks around code pastes.
ok... what are triple backticks?
so this ` three times, then the code and 3 more?
yes
k
name: ha-voice-0a6f10
friendly_name: Home Assistant Voice 0a6f10
esp32:
board: esp32-s3-devkitc-1
framework:
type: esp-idf
logger:
api:
encryption:
key:
ota:
- platform: esphome
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
i2s_audio:
- id: i2s_bus
i2s_lrclk_pin: GPIO42
i2s_bclk_pin: GPIO41
microphone:
- platform: i2s_audio
id: pe_mic
i2s_din_pin: GPIO2
adc_type: external
pdm: false
channel: left
micro_wake_word:
id: mww
microphone:
id: pe_mic
models:
- model:
path: /config/esphome/voice_models/computer.json
voice_assistant:
id: va
microphone: pe_mic
micro_wake_word: mww
use_wake_word: true
also where did you get the above code?
do you have any experience with ESPHome config code?
none whatsoever. i asked google gemini and at 1st the code it gave would install, but then none of the wake words worked at all. then error after error, and this is the final code it gave before i gave up on it
okay there is no gentle way of saying this... basically nothing about the above code is right...
ok... what would be correct?
ok so the best thing you can do at this stage is to start again from scratch.
remove the device from the builder tool, and flash back to stock firmware on the device by plugging into PC and using THIS tool.
Install firmware on Home Assistant Voice PE.
We need to be at a stock and known working state before can start any customisation.
ok, ill get on that. also, i have the wake word tflite file and .json file in multiple locations: config/esphome, and in config/esphome/wake_word, and in config/esphome/voice_models and config/www/wake_words
I assume you were using the builder tool app(formally add-on) on home assistant?
where did you get the files from?
you are usually better off pulling them directly from github when building the firmware.
yes
and i believe i got the files from github
can you link to where?
so after reinstalling and readding the device, i notice that the same incorrect yaml code is still there when i hit edit. and i didnt have to take control of the device, it was already in that state
delete it from the builder tool
give me a moment i am pulling out my debug vpe
ok
yes you should be able to take control and do the install build and install.
I am doing the same on my debug VPE
ah shit it failed out, its looking like the current dev branch is not building.
so my device is still saying "taking control"
what hardware are you on for your ha server?
ok, its done and installing now
ha green
ok compiling VPE firmware on a green will take a while. and it may also fail here.
yeah its still goin...
This builds the current dev build of the firmware pulling in packages with the correct config. it takes a while to build all the components for such a complex device.
I had some issues building, I cleared my build environment and am seeing if it builds now. it might be that dev isnt building currently though.
hopefully it builds then you test to make sure its working correctly all be it without the new wake word yet.
yeah its still goin. i think the last time i did this and everytime i tried pushing new code it takes anywhere from 20-40 minutes
that sounds like it could be about right for a green yeah.
once the majority of the components are built then adding the wake word shouldn't take that much time to rebuild as a bunch of stuff will already be built
I got mine built and added "computer"
let me know once yours is built and working in HA (you will probably have to reconfigre it in the esphome integration to add the encryption key)
still goin.... quick question while its going tho... now that ive taken control of the device, will it take this long to update it every time theresa firmware update?
you mean on esphome updates?
yeah it will take a while to rebuild stuff but it will pop as something to do as a notification in HA and you can set it to go in the background.
for the edit we are going it to make the build with the new model shouldnt take long.
it took about 14 minutes to do intial build on my setup and then maybe a minute or so to rebuild with the new wake word.
ok i think its done. this is now the code i have:
name: home-assistant-voice-0a6f10
friendly_name: Home Assistant Voice 0a6f10
packages:
Nabu Casa.Home Assistant Voice PE: github://esphome/home-assistant-voice-pe/home-assistant-voice.yaml
esphome:
name: ${name}
name_add_mac_suffix: false
friendly_name: ${friendly_name}
api:
encryption:
key:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
is it working in the esphome integration?
as said, you may have to reconfigure
ok nabu is working
ok, without changing anything else you want to add to the bottom
micro_wake_word:
models:
- model: https://raw.githubusercontent.com/JohnnyPrimus/Custom_V2_MicroWakeWords/refs/heads/main/models/computer/computer.json
id: computer
ok, should i try installing it now?
mine for example:
yep that looks identical to mine
then hit save in top right then install and select wirelessly
ok, installing now
then it should appear in the list in HA
so i think its done tho i still have the option to stop it
this is the last line:
[15:30:38.932][D][esp32.preferences:153]: Writing 1 items: 0 cached, 1 written, 0 failed
ay! VICTORY!
it responds to computer!
thank you very much fellow human, was starting to pull my hair out!
tho im noticing something odd. i have to say the wake word very quietly in order for it to respond. if i say it in a normal tone i get nothing
ah nevermind, as i say it more and more it seems to be recognizing the word
onw last quick question, if i wanted to change the wake word to computer, but on a satellite1 board from future proof homes, would the code i add be the same?
Yeah, Different wake word models will have different quirks.
I think it should be the same yes. I am not totally familiar with the satelite1 configuration layout but It would be a place to start.
ok, again thank you very much. been trying to replace alexa for a few months now with HA and the wake word was the final hurddle. think i can now buy 5-7 of these devices and toss these alexas
Remember don't just paste LLM code into a device in future without knowing what is going on. You can damage hardware by doing that.