Voice and AI

Home Assistant Text-to-Speech: Cloud and Local TTS Options

Compare Home Assistant text-to-speech options, from free local Piper to Nabu Casa cloud voices, and how to send spoken announcements to your speakers.

On this page
  1. How text-to-speech works in Home Assistant
  2. Cloud voices
  3. Local voices with Piper
  4. Setting up Piper
  5. Sending a message to a speaker
  6. Echo speakers need a different path
  7. When speech is silent
  8. Common misconceptions

How text-to-speech works in Home Assistant

Text-to-speech (TTS) turns text into spoken audio. In Home Assistant it needs two things: a TTS engine, which provides the voice, and a destination for the audio. For announcements, the destination is a media player, such as a speaker, a Cast device or a Sonos unit. For Assist replies, the TTS engine is one stage of the voice pipeline.

The main action for speaking is tts.speak. Target a TTS entity, then set media_player_entity_id and message:

action: tts.speak
target:
  entity_id: tts.piper
data:
  media_player_entity_id: media_player.kitchen
  message: "The front door is open."

Replace tts.piper with your own TTS entity, and media_player.kitchen with your speaker. Older actions, such as tts.google_translate_say, still exist, but they are older, so use tts.speak for new automations.

Home Assistant caches generated audio in /config/tts by default. The first time a phrase is spoken, it has to be generated. After that, repeat phrases play quickly from the cache.

Cloud voices

  • Home Assistant Cloud: Microsoft Azure neural voices, with many voices in many languages. They are included in a Nabu Casa subscription, which costs about $6.50 a month or $65 a year in the US at the time of writing. The price varies by region. Cloud TTS still needs an internet connection.
  • Google Translate TTS: free and unofficial. It needs internet access and offers little choice of voice. It is not the same as Google Cloud Text-to-Speech.
  • Google Cloud Text-to-Speech: an official Google service with a monthly free tier of characters, then a charge per character. Price tiers vary by voice type, so check the current rates before you rely on it.
  • Other cloud integrations: Amazon Polly, Microsoft Speech and ElevenLabs have official integrations. OpenAI’s TTS is mostly available through HACS (the Home Assistant Community Store), and its status changes, so check it before you build on it.

Local voices with Piper

Piper is the usual local choice. It is a neural TTS engine that uses ONNX voice models. It runs as an add-on or a Wyoming container, and it runs in real time on a Raspberry Pi 4, so it does not need a GPU.

Piper voices come in four quality levels: x_low, low, medium and high. Medium is the usual balance on a Pi 4. Piper has voices for more than 30 languages, and quality varies from voice to voice, so listen to a few before you choose one.

Other local options exist. MaryTTS and Pico TTS are other local engines, and Pico sounds robotic. Community Wyoming servers, such as Kokoro, can run separately and connect to Home Assistant.

Setting up Piper

  1. Install the Piper add-on, or run a Piper Wyoming container on another machine on your network.
  2. Go to Settings > Devices & services. The Wyoming integration should be discovered. Add it.
  3. Choose a language and a voice model. On a Pi 4, start with a medium-quality voice.
  4. Test the voice. Open Media and choose the Text-to-speech source, then type a message and pick a media player. You can also select the voice in an assistant under Settings > Voice assistants.

Sending a message to a speaker

Use tts.speak in an automation, as in the example above. Two things matter most:

  • The media player must be able to reach Home Assistant’s URL, because the speaker downloads the generated audio from there. Check the internal and external URLs under Settings > System > Network. A wrong URL is the most common reason speech is silent on Cast and Sonos devices.
  • Some players, including Sonos, support announce: true in media_player.play_media. On those players, the message plays over the music, and the music is restored afterward.

Echo speakers need a different path

For Echo speakers, do not use tts.speak. Use the Alexa Media Player, installed from HACS, or the notify and announce actions in the official Alexa Devices integration. Both are covered in how to add Alexa to Home Assistant.

When speech is silent

Most failures come from the network or from URLs, not from the TTS engine. Work through this list:

  1. Check the internal and external URLs under Settings > System > Network.
  2. Confirm the media player can play other audio, such as a song from its own app.
  3. Test the TTS entity from the Media browser. If the test works but the automation does not, check the media_player_entity_id in the automation.
  4. If you use a Wyoming service such as Piper, check that the Wyoming integration is connected.

If you want the reply from an Assist command to say something custom, see custom voice commands and sentences, which covers the “Set conversation response” action.

Common misconceptions

  • Local TTS does not need a GPU. Piper runs well on a Raspberry Pi 4.
  • Google Translate TTS is not Google Cloud Text-to-Speech. They are different services.
  • TTS failures are usually network or URL problems, not problems with the TTS engine.
  • A Nabu Casa subscription does not remove the internet requirement. Cloud voices still need a connection.

The complete guide to voice and ai

Home Assistant Voice Control: Wake Words and Local Voice Assistants
Read the guide

Keep exploring

Guides from other topics

All topics →