I recently picked up the Home Assistant Voice Preview, essentially a smart speaker not unlike a Google Home Mini or an Amazon Echo Dot. The difference is that you control it, creating your own commands, and giving you the ability to process audio and have it respond back to you in any way you'd like. So, naturally, mine now responds to me exactly like GLaDOS would, complete with a GLaDOS voice.

Setting this up was astonishingly simple, and to be honest, I kind of expected something to catastrophically go wrong at some point during the setup. I'm using the Whisper and Piper Home Assistant add-ons to make this work, but you can deploy those in a container manually and point Home Assistant to them if you'd prefer to have full control over the stack or if you use the container version of Home Assistant. Whisper handles fast transcription of audio, and Piper is a text-to-speech system with many preloaded voices.

If you want your home to respond to you just like GLaDOS would, we'll go through everything you need to do just that. You don't even need any additional hardware, as this can all run in your browser or from the Home Assistant app.

Installing Whisper, Piper, and your LLM

On HAOS, it's nearly instant

If you're using Home Assistant OS, you can install Whisper by simply going to Settings and then clicking Add-ons. Install each one separately and make sure they're started, and you should then be prompted to install the Wyoming Protocol integration. It will automatically link up Whisper and Piper inside of Home Assistant, so that you can use them as part of your voice assistant flow.

Assuming you're speaking English, you don't need to do anything more here. Right now, everything just works, and you can use the built-in Piper voices and Whisper immediately if you'd like. You don't need super powerful hardware either; in my case, all of this runs on an AMD Ryzen 7 5800U, and there's no difference in terms of performance from any of my other voice assistants.

For getting responses, you have a few options. You can use ChatGPT's API, you can use Google's free Gemini API, or you can use a local LLM. I've tried all three methods, and they all work pretty well, so feel free to pick whichever you'd like. I initially configured this with the Local LLM integration in Home Assistant, and I set it up with LM Studio. If you just want your voice assistant to sound like GLaDOS, you don't need an LLM, but it makes it a lot more fun to have it also jokingly insult you.

Setting up GLaDOS speech synthesis

There's a ready-made model already

Firstly, we'll need to get our GLaDOS files, but we'll also need to edit the configuration file that comes with it before uploading it to our Home Assistant. I'm using this particular model, and you'll need to download both "glados.onnx" and "glados.onnx.json". We'll need to change the names of both files and modify the "glados.onnx.json" file.

First, change each file to match the naming convention Piper expects, in the form of

Next, inside the onnx.json file, we'll be replacing the "dataset", "quality", "voice", and "language" fields. Update these appropriately to match what I have below:

  • dataset: "en_US-glados-medium" (or whatever you changed the file name to, this must match)
  • quality: "medium" (or whatever quality you stated in your file name)
  • voice: "en-us" (this is different from the language identifier that you use; you can find a list of valid options here)
  • language: "en_US" (must match the file name)

Upload these files to /share/piper in your Home Assistant install, and if this folder doesn't exist, you can create it. On HAOS, I uploaded these files to /mnt/data/supervisor/addons/data/core_piper. You can't use Home Assistant's File Editor add-on for this, though I used the FTP add-on instead, which worked just fine. I would then suggest restarting the entire HAOS VM or Piper container, as the steps for Piper to discover and use your voice model will differ depending on your installation type and whether you have a GPU passthrough or not.

These steps are all taken from TextyMcSpeechy, a tool you can use to train your own voice models. There are tutorials there too for all kinds of speech-related tools, so be sure to check it out if you're interested!

Adding GLaDOS to Home Assistant

Chaining everything together

Now that we have everything hooked up, we can create our voice assistant that uses GLaDOS' voice and speaks with her mannerisms. The first thing we'll do is design our system prompt for our LLM, so that it knows how to react to the data it receives and can respond appropriately. Not only does it need to know that it's representing GLaDOS, but it also needs to know that it's being invoked from Home Assistant and will receive information about the entities that are controllable in the home.

The prompt I use, when linking with Local LLM, is as follows:

You are a voice assistant for Home Assistant, and you speak like GLaDOS from Portal. You still abide by human requests, but you are funny and are incredibly insulting while doing so.

Answer questions about the world truthfully.

Answer in plain text. Keep it simple and to the point.

This has given me desirable results, and can be pretty funny at times. Where this prompt is entered depends on what you're using for your LLM, but the integrations I tested (OpenAI, Google Generative AI, Local LLM) will show you a system prompt option when setting them up. You'll need to set this up before adding the assistant.

Once done, go to Home Assistant's Settings, click Voice Assistants, and click Add Assistant. Name it whatever you'd like, and change the Conversation Agent to whatever LLM of your choice. Change Speech-to-text to faster-whisper, and change Text-to-speech to piper, with the language set to American English, and the voice set to GLaDOS. You can then click Try Voice to hear what it sounds like.

Click Create in the bottom right, and it should now be saved and ready to be interacted with. This uses faster-whisper, running locally, to transcribe your voice into text. This then gets tacked onto the system prompt when delivered to your LLM. Home Assistant receives the prompt, and feeds it to Piper for generating a voice, and this voice is then received by Home Assistant and relayed back over the web or over your speakers.

What can GLaDOS do?

A whole lot

Once you've got this set up, feel free to play around with it and see what you can do. You can choose which entities are "exposed" to the assistant, and if you're using a local LLM, then don't expose too many. I ran into this issue and found that it was unreliable, so I restricted its access to approximately 30 or so sensors and devices that I knew I would actually like to read data from and control.

There are a few useful blueprints that you can install in Home Assistant to integrate with an LLM voice assistant, and the two I use the most are for music and for the weather. The weather one you can see in action above, but basically, it will take data collected from your weather sensor and feed it to the language model whenever words like "weather" are used so that it can have additional context. I've not experienced any hallucinations, and it tends to be very consistent in what kind of data it provides.

Not only that, but thanks to the GLaDOS-ification of it, it'll be insulting and funny, too. I once asked it to turn off my light, and it did, but then said, "Try not to trip over and hurt yourself in the dark." It's these little things that make it enjoyable, and it's also a neat little piece of one of my favorite games that I can interact with in my home daily. It works with the Home Assistant Voice Preview too, which is how I primarily interact with it, and the friends I've shown it to so far have loved it.

Play around with it and see what you can do, it's a lot of fun and has meant that my Home Assistant Voice Preview, which I already liked a lot more than my Google Home, gets used so much more.