12 months of the Voice – Chapter 2: Let’s speak

This 12 months is Dwelling Assistant’s 12 months of the Voice. It’s our aim for 2023 to let customers management Dwelling Assistant in their very own language. At present we’re presenting Chapter 2, our second milestone in constructing in the direction of this aim.

In Chapter 1, we centered on intents – what the consumer desires to do. At present, the Dwelling Assistant neighborhood has translated widespread good house instructions and responses into 45 languages, closing in on the 62 languages that Dwelling Assistant helps.

For Chapter 2, we’ve expanded past textual content to now embody audio; particularly, turning audio (speech) into textual content, and textual content again into speech. With this performance, Dwelling Assistant’s Help function is now in a position to present a full voice interface for customers to work together with.

A voice assistant additionally wants {hardware}, so at present we’re launching ESPHome help for Help and; to prime it off: we’re launching the World’s Most Personal Voice Assistant. Maintain studying to see what that entails.

To observe the video presentation of this weblog publish, together with stay demos, verify the recording of our live stream.

Composing Voice Assistants

The new Assist Pipeline integration means that you can configure all elements that make up a voice assistant in a single place.

For voice instructions, pipelines begin with audio. A speech-to-text system determines the phrases the consumer speaks, that are then forwarded to a dialog agent. The intent is extracted from the textual content by the agent and executed by Dwelling Assistant. At this level, “activate the sunshine” would trigger your mild to activate 💡. The final a part of the pipeline is text-to-speech, the place the agent’s response is spoken again to you. This can be a easy affirmation (“Turned on mild”) or the reply to a query, similar to “Which lights are on?”


Screenshot of the brand new Help configuration in Dwelling Assistant.

With the brand new Voice Assistant settings web page customers can create a number of assistants, mixing and matching voice companies. Desire a U.S. English assistant that responds with a British accent? No drawback. What a few second assistant that listens for Dutch, German, or French voice instructions? Or perhaps you need to throw ChatGPT within the combine. Create as many assistants as you need, and use them from the Help dialog in addition to voice assistant {hardware} for Dwelling Assistant.

Interacting with many alternative companies signifies that many alternative issues can go mistaken. To assist customers determine what went mistaken, we’ve constructed in depth debug tooling for voice assistants into Dwelling Assistant. You may all the time examine the final 10 interactions per voice assistant.


Screenshot of the brand new Help debug software.

Voice Assistant powered by Home Assistant Cloud

The Home Assistant Cloud subscription, apart from end-to-end encrypted distant connection, contains cutting-edge speech-to-text and text-to-speech companies. This permits your voice assistant to talk 130+ languages (together with dialects like Peruvian Spanish) and is extraordinarily quick to reply. Pattern:

As a subscriber, you may straight begin utilizing voice in Dwelling Assistant. You’ll not want any further {hardware} or software program to get began.

Along with prime quality speech-to-text and text-to-speech to your voice assistants, additionally, you will be supporting the event of Dwelling Assistant itself.

Join Home Assistant Cloud today

The fully local voice assistant

With Home Assistant you can be guaranteed two things: there will be options and one of those options will be local. With our voice assistant that’s no different.

Piper: our new model for high quality local text-to-speech

To make quality text-to-speech running locally possible, we’ve had to create our own text-to-speech system that is optimized for running on a Raspberry Pi 4. It’s called Piper.

Piper logo

Piper uses modern machine learning algorithms for realistic-sounding speech however can nonetheless generate audio rapidly. On a Raspberry Pi 4, Piper can generate 2 seconds of audio with just one second of processing time. Extra highly effective CPUs, such because the Intel Core i5, can generate 17 seconds of audio in the identical period of time. Pattern:

For extra samples, see the Piper website

An add-on with Piper is accessible now for Dwelling Assistant with over 40 voices across 18 languages, together with: Catalan, Danish, German, English, Spanish, Finnish, French, Greek, Italian, Kazakh, Nepali, Dutch, Norwegian, Polish, Brazilian Portuguese, Ukrainian, Vietnamese, and Chinese language. Voices for Piper are skilled from open audio datasets, a lot of which come from free audiobooks read by volunteers. In the event you’re serious about contributing your voice, tell us!

You may as well run Piper as a standalone Docker container.

Local speech-to-text with OpenAI Whisper

Whisper is an open supply speech-to-text mannequin created by OpenAI that runs regionally. Since its launch in 2022, Whisper has been improved by the open supply neighborhood to run on much less highly effective {hardware} by tasks similar to whisper.cpp and faster-whisper. In lower than a 12 months of progress, Whisper is now able to offering speech-to-text for dozens of languages on small servers and single-board computer systems!

An add-on using faster-whisper is accessible now for Dwelling Assistant. On a Raspberry Pi 4, voice instructions can take round 7 seconds to course of with about 200 MB of RAM used. An Intel Core i5 CPU or higher is able to sub-second response occasions and might run bigger (and extra correct) variations of Whisper.

You may as well run Whisper as a standalone Docker container.

Wyoming: the voice assistant glue

Voice assistants share many common functions, such as speech-to-text, intent-recognition, and text-to-speech. We created the Wyoming protocol to supply a small set of ordinary messages for speaking to voice assistant companies, together with the power to stream audio.

Wyoming permits builders to give attention to the core of a voice service with out having to decide to a particular networking stack like HTTP or MQTT. This protocol is suitable with the upcoming version 3.0 of Rhasspy, so each tasks can share voice companies.

With Wyoming, we’re attempting to kickstart a extra interoperable open voice ecosystem that makes sharing elements throughout tasks and platforms straightforward. Builders and scientists wishing to experiment with new voice applied sciences want solely implement a small set of messages to combine with different voice assistant tasks.

The Whisper and Piper add-ons talked about above are built-in into Dwelling Assistant by way of the brand new Wyoming integration. Wyoming companies may also be run on different machines and nonetheless combine into Dwelling Assistant.

ESPHome powered voice assistants

ESPHome is our software program for microcontrollers. As an alternative of programming, customers outline how their sensors are related in a YAML file. ESPHome will learn this file and generate and set up software program in your microcontroller to make this information accessible in Dwelling Assistant.

At present we’re launching help for constructing voice assistants utilizing ESPHome. Join a microphone to your ESPHome machine, and you’ll management your good house along with your voice. Embrace a speaker and the good house will communicate again.

We’ve been specializing in the M5STACK ATOM Echo for testing and growth. For $13 it comes with a microphone and a speaker in a pleasant little field. We’ve created a tutorial to show this machine right into a voice distant straight out of your browser!

Tutorial: create a $13 voice remote for Home Assistant.

ESPHome Voice Assistant documentation.

World’s Most Private Voice Assistant

If you were designing the world’s most private voice assistant, what features would it have? To start, it should only listen when you’re ready to talk, rather than all the time. And when it responds, you should be the only one to hear it. This sounds strangely familiar…🤔

A phone! No, not the featureless rectangle you have in your pocket; an analog phone. These great creatures once ruled the Earth with twisty cords and unique looks to match your style. Analog phones have a familiar interface that’s hard to beat: pick up the phone to listen/speak and put it down when done.

With Home Assistant’s new Voice-over-IP integration, now you can use an “old fashioned” telephone to regulate your good house!

By configuring off-hook autodial, your telephone will robotically name Dwelling Assistant whenever you choose it up. Converse your voice command or query, and hear for the response. The dialog will proceed so long as you please: communicate extra instructions/questions, or just hold up. Assign a novel voice assistant/pipeline to every VoIP adapter, enabling devoted telephones for particular languages.

We’ve centered our preliminary efforts on supporting the Grandstream HT801 Voice-over-IP box. It really works with any telephone with an RJ11 connector, and connects on to Dwelling Assistant. There isn’t a want for an additional server.

Tutorial: create your own World’s Most Private Voice Assistant

Give your voice assistant character utilizing the OpenAI integration.

Some hyperlinks on this web page are affiliate hyperlinks and purchases utilizing these hyperlinks help the Dwelling Assistant challenge.