Home AssistantSettings

How to set up voice control for Home Assistant

For quite a while, we have had smart speakers in our house, allowing us to control appliances with a simple voice command. People who own those devices know that there are some limitations, such as limited support for smart device developers. For some, lack of native language support might also become a problem.

Before we begin the setup process, you must know that to interact with a device using voice commands, the device must “understand” your request – detect your voice and convert it into an understandable format – text. This process is abbreviated as “STT,” or speech-to-text.

Initial settings

Before we begin the setup process, you must know that to interact with a device using voice commands, the device must “understand” your request – detect your voice and convert it into an understandable format – text. This process is abbreviated as “STT,” or speech-to-text.

You will most likely expect a voiced response to your command. The process of voicing the “response” of the device is called TTS, or text-to-speech.

HA settings go to Add-on Store

In Home Assistant, two separate add-ons are responsible for STT and TTS – Whisper and Piper. Go to the add-on store and install both add-ons.

Open your Home Assistant instance and show the Supervisor add-on store.

After installing, don’t click the start button yet – there’s still something to set up. Go to Whisper’s settings tab and select the language that you wish to use.

HA-whisper-addon-settings1

In Piper’s settings, choose the language and voice that would respond to you.

If, for Home Assistant, you use a single-board computer like a Raspberry Pi, you should select the “extra-low” voice. At the end of the title, you will see “x_low,” which stands for “extra_low.” Here, and further in the article, I choose my native language – Ukrainian. You can select any language from the list. The language list, just like the voice list, is regularly updated.

HA whisper addon settings

Now, you can click the start button for both add-ons. After some time, they will finish loading. You can check the event log to make sure. You should also checkmark “Watchdog” and “Start on boot” on the first tab, which allows the add-ons to start automatically alongside Home Assistant and after an emergency stop.
Go to the integrations list in settings (or click the “MY” button below.)

Open your Home Assistant instance and show your integrations.

Here, you only need to click the “Configure” buttons. The “Wyoming Protocol” integration will appear, which combines Piper and Whisper.

HA integration discovered

Setting up voice control

Go to “Settings” -> “Voice assistants” (Or click on the “MY” button below).

Open your Home Assistant instance and show your voice assistants.

HA settings go to voice

You might have noticed there’s a voice assistant in the list that already speaks English, but we need to add our own, which understands and speaks Ukrainian (or your native language). So, click the “Add Assistant” button.

HA settings go to voice

From the pop-up window where you can select language from both the SST and the TTS, choose the TTS voice down.

HA settings create voice assistant

Usually, these settings are enough for most users. Reboot Home Assistant. After reboot, in the upper-right corner of Lovelace, a speech bubble icon should have appeared, just like in the picture below.

HA voice main page

Click on the icon. A window should pop up where you can give commands.

You can choose an assistant from the list, including the one you created earlier. If your device is missing a microphone or you can’t speak, you can still enter a request using text.

If you’re facing problems speaking to the assistant, try adding the following to your “configuration.yaml” file.

conversation:

Don’t forget to reboot Home Assistant.

Possible issues and some recommendations

You have set up a voice assistant that does not require Internet access to work. The advantage is that it works locally regardless of the network status. However, there are still significant disadvantages. Voice recognition isn’t always perfect. I can only assume that the voice recognition quality depends on CPU load. The image below shows the result of the low-quality voice recognition.

error

The second disadvantage concerns the voice model. As of writing this, only one voice model existed for Ukrainian – lada x-low, and it’s so horrible that you don’t even want to turn it on.

There is a solution that removes both cons – Home Assistant Cloud. Of course, it’s not run locally anymore. Home Assistant Cloud is a service with a monthly subscription that is very useful since it doesn’t include just voice assistants. Also, Ukrainians can use the service free of charge since the full-scale invasion.

After you connect “the cloud,” select Home Assistant Cloud in the voice assistance settings, and the voice recognition quality and the voice will pleasantly surprise you.

voice cloud home assistant

If you use the voice assistant with multiple languages at once, you should create aliases for devices and rooms. It could be names in different languages or different cases. Below is an example of different aliases.

HA-aliases

The image below shows the result of adding aliases.

How to set up the voice assistant on an Android phone

You may have already used Google Assistant by holding the “Home” button. You can change the default assistant app from the settings. Before that, update your Home Assistant to the latest version.

On your Android phone, go to Settings and select “Apps.”

settings-1

Select “Choose default apps.”

settings-2

Select “Digital assistant app.”

 

Select the top button.

settings-4

From the app list, choose Home Assistant and confirm your choice.

settings-5

Close the settings. Now, your default voice assistant app is Home Assistant.

You can now control your smart devices using voice (or text) commands from your phone and your computer.

Also, in the HA settings, you might need to activate voice control for the specific device, but only if you have turned it off earlier.

assist

In one of my reviews, I will show you how to make a cheap smart speaker with the Home Assistant’s voice assistant. The article will be a logical part 2 of today’s review.

Leave a Reply