Using Piper TTS in automations

This procedure shows you how to create a text-to-speech actionActions are used in several places in Home Assistant. As part of a script or automation, actions define what is going to happen once a trigger is activated. In scripts, an action is called sequence. [Learn more]. For this, we use our local text-to-speech engine, Piper, and the media player serviceA service carries out one specific task, for example: turn on the light in the living room. A service has targets and data and can be called by actions, a dashboard, or via voice command. [Learn more]. Home Assistant can then speak to you over your media player as part of an automationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home.[Learn more].

  1. Go to Settings > Automations & Scenes, and select Create automation.
  2. Select Create new automation, then Add action.
  3. From the drop-down menu, select Play media and select the media player you want to use for this automation. Select your media player
  4. Select Pick media, then, select Text-to-speech. Select your media source
  5. To use fully local text-to-speech processing, select Piper. Select Piper
  6. Enter the text you want to hear for this automation. Enter text to be spoken
  7. Your text-to-speech action is now ready to be used in your script or automation. Enter text to be spoken
  8. Save your action.