Almond & Ada: privacy-focused voice assistant

six minutes reading time
  • Announcements
Comments

TL;DR:

  • Teamed up with Almond, available in Home Assistant 0.102.
  • Introducing Ada, voice assistant powered by Home Assistant integrations. Available as Hass.io add-on.
  • New beta speech-to-text and text-to-speech service for Home Assistant Cloud subscribers.

Voice assistants are a great way to interact with your house, ask a quick question, set a timer or control your devices. The more an assistant knows about you, your home and it’s other inhabitants, the better it is able to help you.

Today’s available virtual assistants work great, but they have a big problem: They store your data in the cloud, don’t provide APIs to allow other companies to build products on top and are run by companies whose core business is building profiles on their users to help serve ads and product suggestions.

The backbone to our homes needs to be one that keeps data local and has APIs allowing other companies to build on top. Innovation happens when many different people, with many different backgrounds, do many different experiments until we find something that sticks. This cannot be left to a single company.

Recently we got in touch with the Open Virtual Assistant Lab at Stanford University. In the last four years, they have been working on a virtual assistant named Almond. And it’s a perfect match for Home Assistant.

Almond

Almond is an open, privacy-preserving virtual assistant that is open source. With Almond, you can run a virtual assistant at home, that can tell you the news or control your house. It is powered by LUInet, a state-of-the-art neural network developed at Stanford. And it now works with Home Assistant.

The Almond team has updated Almond to make it aware of the different device types in Home Assistant and allow Almond to control them. In turn, we have upgraded the conversation integration in Home Assistant to support Almond, allowing users to converse with Almond via the frontend.

Screenshot showing Almond integration in Home Assistant.Screenshot showing Almond integration in Home Assistant.

Almond is available to users today in Home Assistant 0.102. It requires an Almond Server, which you can either install yourself, use the new Almond Hass.io add-on or rely on Almond Web, a cloud version hosted by Stanford. By default, Almond Server will rely on a cloud version of LUInet, but it is possible to run it locally.

Almond is set up in a way such that your privacy is still partially preserved even with LUInet running in the cloud. This is made possible because LUInet is only responsible for converting the text into a program, whose details are filled in locally by the Almond Server. For example, LUInet will convert “turn on the lights” into code that Almond Server understands. Only Almond Server will know which lights the user has, how to control them and the context of how the text was received.

How Almond compares to Google/Alexa

You’re probably wondering if Almond is as good as Alexa or Google. And it’s not yet as good. However, it doesn’t matter.

If you want to have an assistant in your home that knows everything about you, it needs to be one that cares about privacy. It needs to be one that is open. That’s not negotiable.

Almond has room for improvement. But it’s open source, and with the Home Assistant community, we’ll work with the Almond team on making it better. You can start helping right now:

Almond is gathering sentences that you want to use to control the devices in your home. We already have a basic set of sentences, but the more, the better. You can submit those sentences using this form.

You are also able to help train LUInet directly by teaching it how to interpret sentences in the training console.

Ada

Almond is not the full story. Almond only works with text input, and generates text as output. It doesn’t handle speech-to-text to receive input nor text-to-speech to speak answers. Those technologies are out of scope for Almond. However, not out of scope for Home Assistant! Home Assistant already has a text-to-speech integration with different backends. In Home Assistant 0.102, we’re introducing a new speech-to-text integration to complement this.

Now we almost have all the pieces for a voice assistant built-in to Home Assistant, and so we decided to finish it off by introducing a new project called Ada. Ada integrates hotword detection and will route all data to the various integrations to provide a full voice assistant experience.

Architectural overview of how all pieces fit together.

Ada is still very much in the beginning. We’ll be working on improving it. If you have expertise in this area and want to help, please get in touch.

Ada is also available as a Hass.io add-on. This means that you can plug a microphone and speakers into your Raspberry Pi and turn Hass.io into a full, privacy-focused, voice assistant.

To make it easier to add speech-to-text and text-to-speech integrations to your system, Nabu Casa is introducing a new beta service offering speech-to-text and text-to-speech services to Home Assistant Cloud subscribers, powered by Azure Cognitive Services.

Can a virtual assistant still be private if parts run in the cloud?

With Home Assistant we care about privacy and local control. We want to be able to offer home automation that keeps working if there is no internet. Home automation, that is fast and reliable.

But we also want privacy to be accessible. A user should be able to get a private solution without running a big server at home. Privacy should not be something that is reserved for the rich.

With the current approach, some things will still run in the cloud, but the home data and control stays local. We will bring more things local when faster technology becomes more accessible or new projects emerge that can help with this.

We don’t want to wait with integrating this until all the pieces run 100% locally. We need to help build the future we want to see.

What’s next?

With Almond and Ada, we’ve put the building blocks in place to create voice assistants. It’s now time to use it, improve it and surprise us by sharing the things you’ll use it for.

We’ve added a new section on the forums to discuss voice setups.

Bonus

I hacked together a quick prototype to allow you to talk to Almond via a Telegram Bot! It’s available as a custom component.

Screenshot of talking to Almond via Telegram.Screenshot of talking to Almond via Telegram.