TTS for Smart Home Devices: Making Your Home Assistant Speak Naturally
Integrating text-to-speech (TTS) into a smart home transforms silent automations into audible feedback. Whether it’s announcing that the laundry is done, warning about an open door, or simply greeting you in the morning, a clear voice adds convenience, accessibility, and a touch of personality. This guide walks through the concepts, setup, and practical tricks for getting reliable, pleasant TTS from Home Assistant, drawing on the strengths of various platforms and community solutions.
Why TTS Matters in a Connected Home
Voice announcements reach you without requiring a glance at a phone or tablet. They work well for:
- Hands‑free alerts – security triggers, appliance timers, or package deliveries.
- Accessibility – users with visual impairments or those who prefer audio cues.
- Contextual awareness – a spoken message can convey urgency or detail that a notification badge might miss.
- Personalization – choosing a voice, language, or even a custom sound effect makes the interaction feel tailored to your household.
When the voice sounds natural and the timing is smooth, TTS stops being a novelty and becomes a useful layer of home automation.
How Home Assistant Handles TTS
Home Assistant does not ship a single TTS service. Instead, it provides a building block integration named tts. Other integrations (such as Google Cast, Amazon Polly, or local engines) plug into this block to expose services like tts.speak and tts.say. The building block takes care of:
- Caching generated audio files (both in‑memory and on disk).
- Transcoding audio to a format the target media player understands via FFmpeg.
- Returning a URL that media players can stream.
The state of a TTS entity shows a timestamp of the last use, which can be handy for debugging or logging.
Because the building block is generic, the same automation logic works regardless of which underlying engine you choose. This modularity lets you swap platforms without rewriting your automations.
Choosing a TTS Platform
Your choice influences voice quality, language support, latency, and privacy. Below are the most common options used with Home Assistant.
Cloud‑Based Services
- Google Translate TTS – free, easy to configure, supports dozens of languages. Voices are functional but can sound somewhat robotic.
- Amazon Polly – offers neutral and neural voices; neural options sound very natural. Requires an AWS account and incurs usage‑based charges.
- Microsoft Azure Speech – provides realistic voices with fine‑grained control over style and emotion.
- ElevenLabs – known for highly expressive, human‑like synthesis. Works via a cloud API; a free tier gives limited monthly characters.
- Inworld AI TTS – offers two models (Max for quality, Mini for speed) and supports 15 languages. Configured through a custom integration.
Local / On‑Device Engines
- Piper – a lightweight, open‑source neural TTS that runs on the Home Assistant host. Good for privacy‑first setups; voice quality varies with the selected model.
- Coqui TTS – another open‑source option with multiple model architectures; can be run on modest hardware.
- eSpeak – very low resource usage, but output is distinctly synthetic; useful for simple alerts where naturalness is less critical.
Local engines eliminate network round‑trips, giving deterministic latency and keeping all text and audio on your LAN. For applications that demand instant feedback—such as voice‑assistant responses—on‑device TTS is often preferable.
Hybrid Approach
Some users run a local engine for quick, frequent alerts (e.g., “door opened”) and reserve a cloud service for longer, less frequent messages where voice quality matters more (e.g., a daily weather summary).
Installing and Configuring TTS in Home Assistant
Regardless of the platform, the basic steps are similar:
- Add the integration via the UI (Settings → Devices & Services → Add Integration) or manually in
configuration.yaml. - Provide required credentials (API key, language, voice selection) as prompted.
- Restart Home Assistant to load the new service.
Example: Google Translate TTS (built‑in)
tts:
- platform: google_translate
language: en
Example: Amazon Polly
tts:
- platform: amazon_polly
aws_access_key_id: !secret amazon_access_key
aws_secret_access_key: !secret amazon_secret_key
region_name: us-east-1
Example: Piper (local)
tts:
- platform: piper
host: localhost
port: 10200
language: en-US
voice: 'en-us-amy-medium'
After saving, go to Developer Tools → Services, pick tts.<platform>_say (or tts.speak with an entity_id), enter a test message, and invoke the service. You should hear the audio on the selected media player.
Crafting Voice Announcements
Simple Automations
The most straightforward way to use TTS is through an automation that calls a TTS service when a trigger fires.
alias: Laundry finished
trigger:
- platform: state
entity_id: switch.washer_power
from: 'on'
to: 'off'
action:
- service: tts.google_translate_say
data:
entity_id: media_player.kitchen_speaker
message: "The washing machine has finished its cycle."
Using Templating for Dynamic Content
Home Assistant’s Jinja2 templating lets you insert states, times, or custom text into the message.
message: >
Welcome home, {{ trigger.to_state.attributes.friendly_name }}.
It is now {{ now().strftime('%I:%M %p') }}.
This produces announcements like “Welcome home, Alex. It is now 05:30 PM.”
Controlling Volume and Playback State
To avoid startling listeners, many users lower the volume of whatever is playing, make the announcement, then restore the previous level.
action:
- service: media_player.volume_set
data:
entity_id: media_player.living_room
volume_level: 0.4
- service: tts.google_translate_say
data:
data:
entity_id: media_player.living_room
message: "Motion detected at the back door."
- delay: "00:00:04"
- service: media_player.volume_set
data:
entity_id: media_player.living_room
volume_level: 0.6
Repeating Announcements
For critical alerts you may want the message to repeat a few times with a pause between.
action:
- repeat:
count: 3
sequence:
- service: tts.google_translate_say
data:
entity_id: media_player.hallway
message: "Please check the front door."
- delay: "00:00:02"
Handling Common Playback Issues
Media Player State Conflicts
If a speaker is already streaming music, some TTS implementations will simply mix the audio, leading to overlapping sound. Community‑created scripts (like the “Smart TTS” Node‑RED subflow) pause the current stream, play the TTS, then resume the original content. The logic generally follows:
- Detect what is playing (URL, Spotify, YouTube Music, etc.).
- Pause the player.
- Optionally store the current volume.
- Set the announcement volume.
- Execute
tts.speak. - Wait for the TTS to finish.
- Restore the previous volume and resume the prior source.
Implementing this pattern ensures that announcements do not interrupt a podcast or playlist in a jarring way.
Audio Format and Transcoding
Not every media player accepts the raw output of a TTS engine. The building block lets you specify a preferred format via the options field:
data:
message: "Test"
options:
preferred_format: mp3
preferred_sample_rate: 44100
If the target player cannot handle the requested format, Home Assistant will transcode the file using FFmpeg. Adjusting the sample rate (e.g., to 44100 Hz for Google Cast devices) often eliminates glitches such as truncated beginnings.
Caching
By default, TTS results are cached both in memory (for rapid repeats) and on disk (for longer‑term reuse). You can disable caching per call with cache: false if you need the freshest synthesis each time.
SSL, Local URLs, and Cast Devices
Google Cast‑based speakers (Google Home, Nest Hub) require media URLs to be resolvable via public DNS and reject self‑signed certificates. If your Home Assistant instance is accessed via HTTPS with a self‑signed cert, the cast device will refuse to play the TTS file. The recommended fix is to not set a manual internal URL; let Home Assistant use the automatic http://<local_ip>:<port> form. This keeps the URL as plain HTTP, which cast devices accept without certificate validation.
If you must use HTTPS (e.g., for remote access), ensure the certificate is valid for the hostname used in the URL, or configure a reverse proxy with a trusted cert.
Displaying Images on Nest Hubs
Some users pair TTS with a visual cue on Nest Hub screens. The “Announcement – Media” script shown in the community example does exactly that:
- Speak the message.
- Show an image (stored locally or via a media source) for a set period.
- Stop playback to return the hub to its idle state.
The script uses variables for the message, speaker list, repeat count, delay, and an optional image path, making it reusable across many automations.
Advanced Enhancements
Chime TTS for Less Jarring Alerts
A sudden voice can be startling, especially if the content is urgent. The Chime TTS custom integration lets you prepend a short sound effect (a chime, ding, or custom effect) to the spoken message. The result is a single audio file where the effect leads directly into the voice, eliminating any perceptible gap. Setup steps:
- Install Chime TTS via HACS.
- Place your effect files in a folder under
www/(e.g.,www/custom_audio/doorbell.mp3). - In the Chime TTS configuration, set the folder path and optionally adjust volume, pitch, or speed.
- Choose your preferred TTS engine (Google, ElevenLabs, etc.) as the default platform.
- Call
chime_tts.sayin your automations instead of a raw TTS service.
The integrated approach guarantees that the effect and voice are perfectly synchronized.
Dynamic Voice Selection
If you enjoy varying the voice based on time of day or mood, you can store multiple voice IDs in an input_select and reference it in the automation:
data:
entity_id: media_player.bedroom
message: "Good night."
options:
voice: "{{ states('input.select.tts_voice') }}"
This lets you switch between a calm female voice for bedtime announcements and a more energetic tone for morning alerts without editing each automation.
Integrating with Voice Assistants
Home Assistant’s built‑in voice assistant (Assist) can be configured to use any TTS platform for its responses. In Settings → Voice Assistants, pick your desired engine under the Text‑to‑speech dropdown. This makes the assistant’s replies sound consistent with your custom announcements.
Best Practices for a Polished Voice Experience
- Keep messages short. Long monologues are fatiguing; aim for one sentence or a concise phrase.
- Prioritize importance. Reserve TTS for events that truly benefit from immediate awareness (security, safety, timely reminders). Avoid announcing every minor state change.
- Match voice to context. A warm, friendly voice works for greetings; a clearer, more authoritative tone suits alerts.
- Test volume levels. What sounds fine in an empty room may be too loud or too soft when ambient noise is present. Adjust per speaker or use dynamic volume scripts.
- Leverage privacy. If you prefer never to send text to the cloud, choose a local engine like Piper or Coqui. For occasional high‑quality needs, you can still call a cloud service on demand.
- Monitor logs. Failed TTS calls often appear as warnings in Home Assistant’s log; checking them helps you catch authentication or connectivity issues early.
- Update models. Cloud providers regularly improve their voices; periodically revisit your configuration to take advantage of newer, more natural‑sounding options.
Future Trends: On‑Device Streaming and LLM Integration
The rise of large language models (LLMs) has increased expectations for conversational latency. Traditional TTS that waits for a full sentence before speaking creates noticeable pauses. Emerging dual‑streaming TTS engines (such as Picovoice Orca) process text token‑by‑token as the LLM generates it, allowing audio to begin almost instantly. When paired with an on‑device LLM, the entire voice‑assistant pipeline can run locally, delivering sub‑second responses without sacrificing privacy.
For smart‑home users, this means future announcements could be generated on the fly, incorporating real‑time data (e.g., “The front door opened at 8:13 PM; would you like me to lock it?”) with a voice that feels like a natural conversation partner.
Conclusion
Adding text-to-speech to your smart home bridges the gap between silent automation and audible feedback. By selecting the right platform, configuring Home Assistant correctly, and applying thoughtful scripting techniques, you can create voice alerts that are clear, timely, and pleasant to hear. Whether you opt for the convenience of a cloud service or the privacy of a local engine, the building‑block design ensures your automations remain portable. With a little attention to volume, formatting, and user experience, your home will not only respond to your commands—it will speak back in a voice that feels like a helpful member of the household.
