Home Assistant continues to make great strides in local voice control for their platform. That latest installment "Year of the Voice Chapter 4" has some nice surprises, the most exciting of which is the ability to use a wake word.
Home Assistant is using the open source openWakeWord by David Scripka. The benefits of doing this is that you can run this on regular hardware and you can even train your own wake word. I haven't tried training anything yet, but the claim is that you can create a basic model in about an hour and it doesn't cost anything but your time.
openWakeWord has four goals it is working to achieve (or has achieved):
- Be fast enough for real-world usage
- Be accurate enough for real-world usage
- Have a simple model architecture and inference process
- Require little to no manual data collection to train new models
To do this, openWakeWord uses a combination of a Google-trained model along with extra tuning provided by Piper, the Home Assistant text-to-speech engine.
In this article, I'm going to focus on creating a cheap voice assistant using the M5Stack ATOM Echo Development kit. I have previously used this device to control my smart home. To use it though, I had to hold down the button. Now we'll take it a step further and just use wake words.
In order to build this project, you will need the following:
- Home Assistant equal to or greater than 2023.10
- Home Assistant Cloud or a manually configured Assist Pipeline
- The password to your 2.4 GHz Wi-Fi network
- Chrome (or a Chromium-based browser like Edge) on desktop (not Android/iOS)
- M5Stack ATOM Echo Development Kit
- USB-C cable to connect the ATOM Echo
The following steps need to be completed in order for this to work:
- Install the openWakeWord add-on in Home Assistant.
- Add a wake word to your voice assistant settings in Home Assistant.
- Install the software on the ATOM Echo device using ESPHome.
Install openWakeWord add-on
This is done just like any other Home Assistant add-on.
- Just go to Settings->Add-ons->openWakeWord and click install.
- Start the openWakeWord add-on.
- Go to Settings->Devices & Services, notice the openWakeWord integration that was auto-discovered and click on Configure and Submit.
Pick a wake word and add it to your voice assistant pipeline.
- Select add assistant under Settings->Voice Assistants.
- Name it whatever you like.
- Choose your language for both the language you will speak to Home Assistant and the language you want Home Assistant to speak back to you.
- In order to choose your wake word, choose openwakeword and pick the wake word. Home Assistant recommends choosing "ok nabu" the first time you run this as a test. You can change it later once everything is working.
- Click on create or update.
Install software onto the ATOM Echo
In order to install the software on the ATOM Echo, you need to be running a Chromium-based browser on a computer desktop. There is no support for doing this via a tablet or phone.
Now I know that many of you who prefer text over video are going to yell at me or whatever because from this point on, the rest of what I have to discuss is better handled in a video format and so I am going to wrap this post by recommending you jump over to my video that covers this post. One of the main reasons is that I had some issues that I talk about in the video and demonstrating how to work around them becomes problematic (at least for me) here on the blog.
Thanks for reading!