6.8 KiB
title
title |
---|
Create your own wake word |
You can now create your own wake word to use with Home Assistant. The procedure below will guide you to train a model. The model is trained using voice clips generated by our local neural text-to-speech system Piper.
Want to know more about how this all works? Check out the openWakeWord project by David Scripka.)
Depending on the word, training a model on your own wake word may take a few iterations and a bit of tweaking. This guide will take you through the process step by step.
Prerequisites
- Latest version of Home Assistant, installed with the Home Assistant Operating System
- M5Stack ATOM Echo Development Kit
- Successfully completed the $13 voice assistant for Home Assistant tutorial
To create your own wake word
-
Think of a wake word.
- A word or short phrase (3-4 syllables) that is not commonly used so that it does not trigger Assist by mistake.
- Currently, only wake words in English are supported.
-
Open the wake word training environment.
-
In section 1, enter your wake word in the target_word field.
-
In the code section next to the target_word, select the play button. The first time this can take up to 30 seconds.
-
If the play button does not appear, make sure your cursor is placed in the target_word field.
-
If it still does not show up, in the top right corner of the document, make sure it says Connected.
-
Result: The pronunciation of your wake word is being created.
- Once it is finished, at the bottom of the section, you see an audio file. Listen to it.
-
-
If the word does not sound correct to you:
- Follow the instructions in the document to tweak the spelling of the word and press play again.
- The word should sound the way you pronounce it.
-
Once you are satisfied with the result, in the menu on top of the screen, select Runtime > Run all.
-
Congratulations! You just applied machine learning to create your own wake word model!
- The next step is to add it to Home Assistant.
To add your personal wake word to Home Assistant
- Make sure you have the Samba add-on installed.
- On your computer, access your Home Assistant server via Samba.
- Open the
share
folder and create a new folderopenwakeword
so that you have/share/openwakeword
.
- Open the
- Drop your shiny new wake word model file (
.tflite
) into that folder. - Go to {% my voice_assistants title="Settings > Voice assistants" %}.
- Either create a new assistant and select Add assistant.
- Or, edit an existing assistant.
- Under Wake word, select openwakeword.
- Then, select your own personal wake word.
- If there is no Wake word option, make sure you have the add-on installed and successfully completed the $13 voice assistant for Home Assistant tutorial.
- Enable this new assistant on your ATOM Echo device.
- Test your new wake word.
- Speak your wake word followed by a command, such as "Turn on the lights in the kitchen".
- When the ATOM Echo picks up the wake word, it starts blinking blue.
Troubleshooting
Troubleshooting wake word recognition
- If the ATOM Echo does not start blinking blue when you say the wake word, there are a few things you can try.
- Go to {% my integrations title="Settings > Devices & Services" %} and select the ESPHome integration.
- Under M5Stack ATOM Echo, select 1 device.
- Under Controls, make sure Use wake word is enabled.
- If this was not the issue, you may need to tweak the wake word model.
- Go back to the wake word training environment.
- In section 3 of the document, follow the instructions on tweaking the settings and create a new model.
Troubleshooting performance issues of the training environment
The environment on the Colab space runs on resources offered by Google. They are intended for small-scale, non-commercial personal use. There is no guarantee that resources are available. If many people use this environment at the same time or if the request itself uses a lot of resources, the execution might be very slow or won't run at all.
It may take 30-60 minutes for the run to complete. This is expected behavior.
Things you can try if the execution is very slow:
- Free of charge solution: This environment has worked for all the wake word models that were trained to create and test this procedure. There is a good chance that it will work for you. If it does not, try training your model another time. Maybe many people are using it right now.
- You can pay for more computing resources: In the top right corner, select the RAM | Disk icon.