“Create a text of 20 seconds about Home Assistant The Year of Voice”. This can now be done within Home Assistant and I am going to explain in this video how you can set it up yourself! Let’s see what’s new in Home Assistant 2023.5!
⭐⭐⭐ NOTE: ⭐⭐⭐
This article accompanies a YouTube video. I wrote it for people who would rather read than watch a video. In order to keep doing this, I would like to ask you to also check out the video, leave a comment under the video, give the video a thumbs up and subscribe to my YouTube channel. This means that the video is offered more often to new visitors so that they also stay informed of the latest Home Assistant tutorials.
Thank you for your support!
Home Assistant releases a new version every first Wednesday of the month. The beta version of Home Assistant 2023.5 is released a week before for us all to test the new functionalities. You can help with testing by joining the beta channel. For this, go to Settings > System > Updates. Click on the three dots in the right upper corner and select Join Beta channel. This video is based on the beta release and it might be that some functionalities will not make the monthly release, but I will show the current options nevertheless. Home Assistant is focussing on Voice control this year and boy, this time a lot of new functionalities are added for that in Home Assistant 2023.5! I will tell you all about it in this video including how you can easily set it up yourself!
But, let’s start with the other things that are added this month and hop over to the voice additions after that!
Webhooks in Home Assistant 2023.5
Using webhooks was already possible in Home Assistant, but now you can also use the GET HTTP method. Plus, you can set which HTTP methods your webhook trigger works with and select whether they only work from the local network!
Configuring the LEDs of Home Assistant Yellow
The next killer feature is that you can configure the LEDs of your Home Assistant Yellow… I do not own a Home Assistant Yellow, so I am not able to show you this awesome feature, but I can totally imagine that you Yellow owners will be super happy with this option ;).
There are some more changes to mention before we jump to the new Voice Assistant functionalities in the Noteworthy changes list like that Matter also supports covers now and that the backup process is faster!
The media browser can now show Synology Photos too, so if you use Synology Photos on your Synology NAS, you can use the photos from your NAS in Home Assistant 2023.5 now too.
New Integrations in Home Assistant 2023.5
There are some new integrations added in this release and the most notable one for me is the Roborock integration. Now, you might say that this is nothing new because you could already use the Xiaomi integration to show Roborock vacuums in Home Assistant. But, when you used that integration, it wasn’t possible to keep using the Roborock app anymore. That was the exact reason why I didn’t use the Xiaomi integration. With this new Roborock integration, you can use the Roborock app and the integration in Home Assitant simultaneously. I have to say it’s not a local connection, but the fact that you can still use your Roborock app is a plus for me!
Now, let’s head over to the new Voice Assistant features and how you can install them on your system! Beware, I am doing this in the beta release at the moment. Things might change over time!
As of this version, it is possible to talk to Home Assistant in various languages and Home Assistant will respond in the language of your choice! To use this locally, we need to install two add-ons in Home Assistant. One is called Whisper and the other one is called Piper.
- Go to Settings.
- Go to Add-ons.
- Click Add-On store.
- We are now going to install Whisper which is the Speech to Text add-on.
- Search for Whisper.
- Click Whisper, and click Install.
- After Whisper is installed, you can toggle the Watchdog and Auto update toggles if you like.
- In the configuration, you can select the model used. By default, the tiny-int8 model is used which is able to run on a Raspberry Pi 4.
- You can also select the language that you will speak to the add-on. There’s a possibility to select “auto” so that the add-on will recognize the spoken language, but the system will respond slower that way.
- Now, click save, go to the info tab, and click Start to start Whisper.
Now we are going to install Piper, which is the Text to Speach add-on
- Go back to the add-on store.
- Search for Piper.
- Click Piper.
- Click Install.
- You can again toggle Watchdog and Auto update to on.
- When we go to the configuration, you can select the voice that you want Piper to use. I am going to choose for Ryan-Medium. The rest of the settings are to fine-tune the pronunciation. I’ll leave it to default.
- Click Save and go back to the info tab to start the add-on.
Configure Whisper & Piper
Now that Whisper and Piper are installed, we have to configure them in Home Assistant. Go to Settings > Devices and Services.
- Click Configure on the Whisper card.
- Click Submit to connect to the Wyoming service.
- Click Finish.
- Click Configure on the Piper card.
- Click Submit to connect to the Wyoming service.
- Click Finish.
Now everything is installed, we need to add voice assistants. We are first going to set up a voice assistant that works fully locally. After that, I will set up a voice assistant that makes use of Home Assistant Cloud, also known as Nabu Casa. You will see that that last option has more possibilities.
Setting up a Voice Assistant locally
- Go to Settings and click the new Voice Assistants menu-item.
- Click Add Assistant
- Give your Assistant a name. In my case, it is English HA.
- You can select a language here. In my case, I can only select English because I do not use Home Assistant Cloud in this example. If you use Home Assistant Cloud, you will be able to create Multiple Assistants in different languages. I will show you in a second how it looks when you use Nabu Casa.
- The conversation agent is Home Assistant and the Language is again English.
- I select faster-whisper in the Speech to text field, and the language is again English.
- And in the Text to Speech field, I choose Piper. In the language field, I can only Choose American English. You will see in a minute that I can choose more language variants when I use Home Assistant Cloud.
- The voice field gives me the option to select the voice that I’ve selected in the Piper add-on configuration.
- Now you can try the voice to see if it works.
- Click Create.
- Oh, just one more thing: if you want to use a voice assistant locally, you must use HTTPS. It will not work if you use HTTP!
Setting up a Voice Assistant using Nabu Casa
Now, let’s set up another voice assistant, but this time I am going to use Home Assistant Cloud.
- Click Add Assistant.
- Give your Voice Assistant a name. In my case, I will name it Dutch HA.
- When I click on the Languages field, you will see that I have a lot more languages to choose from. I will choose Dutch.
- You’ll see that all the other fields adapt automatically to my choice to create a Dutch Voice Assistant.
- I can choose language variants In the Speech to Text Language field. For Dutch, I can choose Dutch and Flemish. For other languages, you can choose other variants.
- I can also choose language variants in the Text to speech field. When I select a variant, the corresponding voices change as well.
- And, I can select a specific voice in the voice field.
- Let’s try out the voice.
- Click create.
As you can see, when you use Nabu Casa, you get a lot more possibilities, but if you only need one language for your voice assistant, then you can just set it up locally and it will work fine. There is another reason why Nabu Casa is interesting, and that is that the response time is very fast when you use Nabu Casa. When you have Home Assistant running on a Raspberry Pi 4, you will notice that the response time is way slower.
I need your help!
You will be doing me a huge favor if you subscribe to my channel if you haven’t already. And, you help me a lot if you also give this video a thumbs up and leave a comment. This way, YouTube will present this video to new people and that will make the channel grow! In the description of the video, you will also find information about how you can sponsor me so that I can continue to make these tutorials for you.
Test the Voice Assistants!
We’ve set up our voice assistants. Now, let’s test if they work!
- Go to one of your Dashboards.
- Click on the speech bubble in the right upper corner.
- You’ll see that I can choose one of the voice Assistants that I’ve configured before.
- Let’s select the English HA voice assistant that I created locally using Whisper and Piper.
- When I click on the microphone, I can start talking into my microphone. Note that if you do not see a microphone here, you are probably accessing your Home Assistant server through HTTP instead of HTTPS. You have to access Home Assistant through HTTPS to make this work.
- You see that there is some delay when using the local integration.
- Now let’s switch over to the Home Assistant Cloud Voice Assistant and see how that performs.
- You see that the Home Assistant Cloud Voice Assistant responds almost immediately, which is much faster than the local Voice Assistant.
- Now let’s switch to the Dutch version.
Isn’t that awesome? You can now use Home Assistant as a Voice Assistant to control your devices. But it can do even more… We can use artificial intelligence or AI by connecting OpenAI to our voice assistant and starting a conversation with it as well. You can install the OpenAI integration in Home Assistant, but beware that you can only use this if you have a paid plan.
Set Up OpenAI
To install it, go to Settings > Devices and Services.
- Click Add Integration.
- Search for OpenAI.
- Click OpenAI Conversation.
- Now you need to enter an API key.
- To retrieve the API key, go to the OpenAI website and create an account, or log in with your existing account.
- After you’ve logged in, go to Billing and enter valid credit card data.
- Then go to Usage Limits and set the limits the way you like. Don’t worry, using the API won’t cost a lot of money. I’ve tested this a bit and it cost me 5 cents only for the testing that I did.
- Then, go to API keys and create an API key.
- Copy the API key to your clipboard and go back to Home Assistant.
- Paste the API key in the API-Key field and click submit.
- You can configure OpenAI by going to the OpenAI device card and clicking Configure. I’m not sure if you even have to do this, but I just clicked submit after looking at the configuration, and that worked fine for me.
Create a voice assistant for OpenAI
In the next step, we need to create a Voice Assistant that makes use of OpenAI.
- Go to Settings.
- Go to Voice Assistant.
- Click Add Assistant.
- Enter a new Name. In my case it’s OpenAI.
- Select OpenAI as the conversation agent and in my case I select American English for the speech-to-text and text-to-speech languages.
- Click create.
Let’s test this! Go to one of your dashboards and click on the text bubble in the right upper corner. Select the OpenAI Voice Assistant and start asking questions to Home Assistant.
Isn’t this awesome? Now you can ask questions to OpenAI using Home Assistant!
Using an external microphone
And there’s even more. You can connect an external microphone to Home Assistant using ESPHome to control your Voice Assistant from anywhere in your house. The only downside is that you have to activate it by pushing on it and you cannot use a hot word to activate it like “Hey Google, Hey Siri or Hey Alexa”. This device is the Atom Echo and it’s really tiny and cheap. I’ve added a link in the description where you can buy it and how you can flash it. I’ve flashed it with ESPHome and I can use it to control Home Assistant now like this.
Now, this “What’s new in Home Assistant 2023.5 turned out to be a tutorial on how to use Voice Assistants in Home Assistant after all. Be aware that this currently only works in the beta version of Home Assistant 2023.5, but will be available in the official release on the 1st Wednesday of May. I think the Home Assistant team did a tremendous job in setting this up and we are not even past the first half of this year.
I am very excited about what the next months will bring in this year of voice! If you want to make sure that I can keep informing you about all the developments around Home Assistant, please consider sponsoring me just like these wonderful people, who are my patrons. They play a vital role in making sure I can make these tutorials. And please do not forget to give this video a thumbs up and subscribe to my channel so that it will be presented to more people on YouTube.
Thanks for watching and I will see you soon in my next video!
Home Assistant, ai, openai, open ai, artificial intelligence, text to speech, speech to text, ai voice generator, how to, tutorial, what’s new, voice assistant, smart speaker,