Home Assistant sends the list of external wake words it knows about with
every configuration request. This picks up the ones micro_wake_word can
run, downloads them on demand, and hands them to micro_wake_word so they
can be activated like a compiled-in model.
Set the new http_request option to turn this on. It requires
micro_wake_word to be configured, and pulls in the sha256 and json
components used to verify a download and read its manifest.
How it works:
- The advertised wake words are cached on each configuration request, so
entries Home Assistant stops sending drop out and their models are
unloaded.
- When Home Assistant activates a wake word whose model is not loaded
yet, the model is queued and fetched by a background task. The wake
word is reported as active straight away so the UI reflects the request
while the download runs.
- Downloads are checked against the size and hash from the manifest, and
the model has to use the same feature step size as the frontend.
- A model that fails to load is stored as disabled so it is not retried
on every boot.
- Loaded models are restored after a reboot.
The configuration response now comes entirely from voice_assistant, which
merges the compiled-in models with the cached external wake words, so the
API no longer needs to append them itself.