Trying to add custom wake word to Voice PE

Hopefully someone can explain why, when I am using ESPHome Builder (Latest released 3 days ago) to add a custom wake word to Voice PE It doesn't want to save because of error:

[micro_wake_word] is an invalid option for [].

micro_wake_word:
models:
- model:
type: http
url: "http://192.168.0.187:8123/local/wake_words/hey_lilly.json"
id: hey_lilly
- model: okay_nabu
id: okay_nabu_model
- model: hey_mycroft
id: hey_mycroft_model

However, it does not have a problem saving the yaml if I remove my custom wake word

micro_wake_word:
models:
- model: okay_nabu
id: okay_nabu_model
- model: hey_mycroft
id: hey_mycroft_model

Is there something wrong with how I am trying to add my custom wake word, or did a bug creep into the latest release of ESPHome?

Don't know much about wake words. Did you read the documentation here: Micro Wake Word - ESPHome - Smart Home Made Simple

Or, did you get AI to help you?

This is what you have (note that the spacing is not correct, you might have it correct in what you used, but it showed up wrong, since you didn't use code tags)

micro_wake_word:
models:
- model:
type: http
url: "http://192.168.0.187:8123/local/wake_words/hey_lilly.json"
id: hey_lilly

The docs say model takes a string:

model (Optional, string): 

Your YAML is providing something that doesn't match the schema, since it includes type and URL (which are not part of the schema).

How did you create the hey_lilly.json file? There is a GitHub repo that has training instructions. Did you follow those?

Thanks for the fast response. I spent 3 days going around in loops with Google AI. It came up with many configurations some that would even upload to the Voice PE but none of them worked to add the custom wake word to the drop down list or take over one of the existing ones like hey jarvis. As far as this piece of code goes it is a mix of an example that works and using the tool on ESPHome, that is just to the left of the code pane, to add my extra model. To me the tool is suspect because typing in the ID field causes a id: to be added for every character typed.

- model:
    type: http
    url: "http://192.168.0.187:8123/local/wake_words/hey_lilly.json"
  id: hey_lilly
  id: hey_lill
  id: hey_li
  id: hey_l
  id: hey_
  id: hey
  id: he
  id: h
That doesn't inspire confidence in the tool being fully functional. That is why I was hoping to get some feedback on it.

The linked GitHub repo says this:

microWakeword is currently available as an early release. Training new models is intended for advanced users. Training a model that works well is still very difficult, as it typically requires experimentation with hyperparameters and sample generation settings.

This says to me: "something that is not ready for people who are the developers that created this to use".

I would suggest staying with the predefined wake words.

To get around the YAML syntax you could use something like:

micro_wake_word:
  models:
    - model: "http://192.168.0.187:8123/local/wake_words/hey_lilly.json"
    - model: okay_nabu
      id: okay_nabu_model
    - model: hey_mycroft
      id: hey_mycroft_model
wake_word:
  on_wake_word_detected:
    then:
      - voice_assistant.start:
          wake_word: !lambda return wake_word;

Note that the id is optional, unclear what value it actually provides. Looks like it allows you to enable/disable the various models. Since the first one is enabled by default, it should be fine without it.

You should use GitHub - TaterTotterson/microWakeWords: Tater/Home Assistant voice satellite firmware and microWakeWords for VoicePE, Satellite1, and ReSpeaker XVF3800 with microWakeWord, openWakeWord, and nanoWakeWord support. · GitHub

all you need to do is create an issue and it will generate the wakeword files for you

The only YAML you need for the ESPHome builder is

micro_wake_word:
  id: mww
  models:
    - model: /config/microwakeword/models/ha-vpe.json
      id: hey_robot

Sadly, this still causes the code pane editor to generate: Component not found: wake_word.
And when I remove the wake_word part the editor falls back to the original error

[micro_wake_word] is an invalid option for [<root>].

BTW another update to ESPHome Builder was released a couple of hours ago. I installed it a while ago. It still didn't fix the ID Field from creating an id: for every character typed.

Thank you. It looks very complicated and is probably the path I need to follow at this point.

Yeah, that repo looks like it might be the Easy Button (tm)
The method listed in the esphome docs is even harder and appears to require work you haven't even done yet.

From the repo readme:

Please see the basic_training_notebook.ipynb notebook to see how a model is trained. This notebook will produce a model, but it will most likely not be usable! Training a usable model requires a lot of experimentation, and that notebook is meant to serve only as a starting point for advanced users.

I actually have a model that I generated on openwakeword.com However, I don't know if it works because I've never gotten to the point where it was being used by the Voice PE. That will be the final hurdle. Anyway, Thank you for all your help.