#can someone guide me through the process of using a custom wake word on a voice pe?

1 messages · Page 1 of 1 (latest)

potent grail
#

The custom word i want to use is computer. i have the tflite and json files, i just need to know how to code the yaml and where to put the files

steel harbor
potent grail
#

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

steel harbor
potent grail
#

ok... what are triple backticks?

steel harbor
#

`

#
to make a code block
potent grail
#

so this ` three times, then the code and 3 more?

steel harbor
#

yes

potent grail
#

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
steel harbor
potent grail
#

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

steel harbor
steel harbor
#

We need to be at a stock and known working state before can start any customisation.

potent grail
#

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

steel harbor
#

I assume you were using the builder tool app(formally add-on) on home assistant?

steel harbor
#

you are usually better off pulling them directly from github when building the firmware.

potent grail
#

and i believe i got the files from github

steel harbor
potent grail
#

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

steel harbor
#

delete it from the builder tool

potent grail
#

done

#

now i have the option of taking control of it. should i do that now?

steel harbor
#

give me a moment i am pulling out my debug vpe

potent grail
#

ok

steel harbor
#

I am doing the same on my debug VPE

#

ah shit it failed out, its looking like the current dev branch is not building.

potent grail
#

so my device is still saying "taking control"

steel harbor
#

what hardware are you on for your ha server?

potent grail
#

ok, its done and installing now

potent grail
steel harbor
potent grail
#

yeah its still goin...

steel harbor
#

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.

potent grail
#

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

steel harbor
#

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)

potent grail
#

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?

steel harbor
#

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.

potent grail
#

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
steel harbor
#

as said, you may have to reconfigure

potent grail
#

ok nabu is working

steel harbor
#

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
potent grail
#

ok, should i try installing it now?

steel harbor
#

mine for example:

potent grail
steel harbor
potent grail
#

ok, installing now

steel harbor
#

then it should appear in the list in HA

potent grail
#

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?

steel harbor
steel harbor
potent grail
#

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

steel harbor
#

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.