Text-to-speech for spoken notifications

hi.
i use home assistant on a raspberry pi 4, and i want to have spoken notifications (like “the washing machine has finished”). but how do i do that? someone told me i should minstall VLC, so i did. but now what? what do i need to put in my configuration file? i know how to trigger actions but how do i tell it what to say? is there a tutorial somewhere?

PS. i forgot to mention that i want to use a local tts service, like picotts or marytts. i’m not interested in letting the world know what’s going on at my place.

1 Like

Well. What device do you want to speak to? Google? Alexa? a speaker?

I think this may be what you are looking for:

Hope this helps
Kind Regards
M

not exactly. i don’t want to send the audio to another device, i want to send it to the audio output on the raspberry pi itself.

i got it to work - kinda. instead of “the washing machine has finished”, it only says “the washi-”. what’s going on here? what can i do about it?

Did you want to share what you did so someone could comment?

i added the following to my configuration.yaml:

tts:
  - platform: marytts
    language: "en-GB"

media_player:
  - platform: vlc
    name: speaker_1

and i added the following script:

washing_machine:
  alias: Washing machine
  sequence:
  - service: tts.picotts_say
    data:
      entity_id: media_player.vlc_telnet
      message: '"The washing machine has finished"'
  mode: queued

FWIW Google found this article: Use a speaker with Home Assistant on a RaspberryPi to output audio messages - Sven's development notes