logo smart home family kruse

Kruse Smart Home

Easy living in our smart home & Garden

Using your own wake word for Home Assistant’s voice assistant

Using your own wake word for Home Assistant's voice assistant

25 November 2023

Jan-Willem

1. Introduction

Using your own wake word for Home Assistant’s voice assistant enables you to personalise your smart home’s voice control. Something which is not possible with Google Home (Hey Google) or Amazon Alexa (Hey Alexa).

Before you can use your own wake word for Home Assistant to control your home by voice you need to setup Home Assistant’s own voice assistant, which has the benefit it is not cloud based. See our article “Home Assistant voice control with an Atom Echo“. The check M5 Atom Echo is used as a listening/speaker device.

The default wake words (openWakeWord model based) available in Home Assistant voice control are:

  • alexa
  • hey jarvis
  • hey mycroft
  • hey rhasspy
  • ok nabu

It is possible to create your own wake words, but unfortunately currently only in the English language. Fortunately the commands used can be spoken in all languages supported by Home Assistant such as Dutch, German, Spanish etc.

This article describes creating and using your own wake word for Home Assistant’s voice assistant and is based on the following sources:own

2. Requirements

The following is required:

3. Creating your own wake word for Home Assistant

The wake word you want to use should be:

  • English language based
  • a word or short phrase (3-4 syllables)
  • not commonly used so that it does not trigger the voice assistant by mistake.

For some ideas have a look into the top birthnames over the last 100 names in the US.

To use your wake word a model needs to be created, which involves setting up the wake word and training the model with synthetic samples for variations in pronunciation.

  1. Open the wake word training environment.
  2. In section 1 “Test Example Training Clip Generation”:
    a. enter your wake word in the target_word field
    b. click on the play button left of the section header
    The first time this can take up to 30 seconds.
    c. when finished check the pronunciation of your wake word
  3. If the word does not sound correct to you, tweak the spelling of the word (or enter a different wake word) and press play again. The word should sound the way you pronounce it.
  4. In section 3 “Train the Model” you can change the default settings before you run the model creation.

    Changing the default settings will have impact on the time required to create the model. I used 40000 examples, 20000 training steps and false activation penalty of 1200. Also I switched the runtime type to GPU.
  5. In the menu on top of the screen, select Runtime > Run all.This will take around an hour. Feel free to do something else but make sure to leave the browser tab open!
  6. When the process is finished, you should have 2 files in your downloads folder: .tflite and .onnx files. Only the .tflite is used.

The next step is to add it to Home Assistant so you can start using your own wake word for Home Assistant.

4. Add the created wake word to Home Assistant

The created file from the openWakeWord model needs now to be made available to Home Assistant.

  1. Make sure you have the Samba add-on installed.
  2. On your computer, access your Home Assistant server via Samba.
    Open the “share” folder and create a new folder “openwakeword” in it. You have “/share/openwakeword”.
  3. Copy the new wake word model file (.tflite) into the openwakeword.
  4. Within Home Assistant go to Settings > Voice assistants.
  5. Open the voice assistant for which you want to change the wake word (note this is only possible for Home Assistant voice assistants).
  6. Under the Wake word option select openwakeword as wakeword engine.
  7. Select the newly added wake word from the “Wake word” drop-down list.

 

Test the new wake word for Home Assistant.

Article by <a href="https://smarthome.familykruse.eu/author/iamjwk/" target="_self">Jan-Willem</a>

Article by Jan-Willem

Position

Writen by the website owner

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *