Yep, I discovered that too. Not really a terrible solution, but I will probably put in a ticket for this. If I re-run the automation within a few minutes, it picks up where it left off last. Sometimes it is able to get through the entire script, which takes about 3 minutes, but I believe that is only because so much of the automation was cached at that point. I could be wrong.
In the mean time, I’ll just break up the automation with delays, but will open a ticket as well. There are no errors in the logs.
One last thing, I have to surround the TTS script with quotes due to formatting, and the voice ends the with a “heh” sound after it is done reading everything. I’ll add that to the ticket as well.
About the original question - in case someone else also finds this via Google later - the default model to use in Piper is configured in the Piper Addon configuration in the HAOS. So HA → Settings → Addons → Piper → Configuration → Voice. I also needed to “Reload” the Piper entity provided by the Wyoming integration for the voice list to be correct.
Just wondering if anyone has worked out how to queue piper in a tts automation. At the moment I have an announcement every morning (that varies in length) after which the radio plays. however the radio starts playing as piper is reading out the announcement?
Hi @Garyw
You can use the custom Chime TTS integration. If you use it in a sequence before the radio it will play your TTS message, delay the sequence, and then the radio should start playing with the right length of delay.
Hey everyone, I’m a n00b but somehow managed to get it work. You can also adjust the message based on states and entity attributes (as probably many of you want like me).
Quite interestingly, you set the language via voice (and not language attribute). For me it was sk_SK-lili-medium (you get options for this from piper config).
Here’s my code also with some message bloat you can remove. You can test in web developer services debug.
service: tts.speak
data:
message: >-
{% set t = states('weather.domov_2') %}
{% if t == 'cloudy' %} {% set t='oblačno' %}
{% elif t == 'sunny' %} {% set t='slnečno' %}
{% elif t == 'rainy' %} {% set t='dážď' %}
{% elif t == 'snowy' %} {% set t='sneh' %}
{% elif t == 'partlycloudy' %} {% set t='polooblačno' %}
{% endif %} Vonku je {{ t }}, {{ state_attr('weather.domov_2','temperature')
}} stupňov a vlhkosť je {{ state_attr('weather.domov','humidity') }}
percent. Rýchlosť vetra je {{ state_attr('weather.domov_2','wind_speed') }}
kilometrov za hodinu
options:
voice: "sk_SK-lili-medium"
media_player_entity_id: media_player.sonos_roam
cache: true
target:
entity_id: tts.piper