Tag Archives: Voice

Using voice commands to control Home Assistant. Part 2

Today, we continue setting up voice control in Home Assistant. This time, we will need a small yet cheap device with a speaker and a microphone “on board.” Let’s assume all the initial settings I wrote about here have been applied.

Setting up and flashing firmware on the ATOM Echo

You will need a device which you can buy here and here, approximately, it only costs 13$.

Follow this link, and you will see the “CONNECT” button.

Connect the ATOM Echo to the computer using USB and click the “CONNECT” button.

If you haven’t downloaded the firmware for similar devices, you might not have the USB driver installed. A pop-up window will only show the standard COM-port.

Click “Cancel,” and you will see a pop-up window where you can install the USB driver.

Install the driver for CH342 devices. Only after you do so will the required port show up. Select it and click the “Connect” button.

Select “INSTALL VOICE ASSISTANT.”

The process of flashing the firmware will now start. Do not close the page while the firmware is flashing.

After the installation finishes, click “NEXT.”

You need to enter the credentials of your Wi-Fi network in the next step.

Click “ADD TO HOME ASSISTANT” to add the device. A new window should show up, advising you to add an ESPHome integration if you don’t have it yet.

After you add the device, you can choose a room or zone for the device.

The image below shows the ATOM Echo in the list of ESPhome devices.

In ESPHome, you need to “ADOPT” the ATOM Echo, after which you should update the firmware to the latest version.

You now have all the sensors and control elements in the integration. From the drop-down list, select the language model created earlier, click ATOM Echo button, and give a command to Home Assistant. Everything should work as intended.

Setting up the wake word

With the latest Home Assistant update, you can activate your “smart speaker” without physical intervention. It’s not difficult to do. Open the add-on store (or click the button below).

Install the openWakeWord add-on, and click “Start” afterward. The add-on doesn’t need setting up.

After installing the add-on, open the Integrations settings.

Go to voice assistants and click the one you want to edit.

In the pop-up window, select Wake word engine and the wake word from the list to the right. Click “Update.”

The last thing you should do is check if the wake word is on for the ATOM Echo. After you turn on “Use wake word,” your speaker will light up with a lilac color, which means it’s waiting for your voice command. Below in the drop-down list, you can select a voice assistant the device will use.

In future reviews, I will show how to make a custom wake word, so stay tuned. See you.

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.

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.

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.

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.

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.)

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

Setting up voice control

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

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.

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

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.

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.

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.

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.

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.”

Select “Choose default apps.”

Select “Digital assistant app.”

Select the top button.

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

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.

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.