Hands-Free Control with Wake Words

Hands-Free Control with Wake Words

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.

💡
The video for this blog can be found here.

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.

A visual representation of using the Google model with Piper to train wake words. IMAGE CREDIT: Home Assistant

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.

The M5Stack Atom Echo Development Board

In order to build this project, you will need the following:

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.
  • Play!

Install openWakeWord add-on

This is done just like any other Home Assistant add-on.

  1. Just go to Settings->Add-ons->openWakeWord and click install.
  2. Start the openWakeWord add-on.
  3. 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.

  1. Select add assistant under Settings->Voice Assistants.
  2. Name it whatever you like.
  3. 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.
  4. 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.
  5. 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!