I am wondering if it is possible to configure Piper as a standard TTS for automations, similar to how you can use cloud.tts. I could have missed examples already posted. Thanks to anyone who can help or point me in the right direction.
I did find a post some where that allowed me to use the current default voice as
Thanks folks I appreciate this and will give it a shot. At least it looks like it was not straight forward.
Is there a way to set the voice in the call as well? or are you restricted to the voice set as default?
I had looked there and saw an example in another language of language: “fr” but then it says it has “options” without actually showing how that might look.
I tried with “en” and failed does not seem to be an option, I took a look at the YAML of the default setting in Piper and thought I would give this a shot (didn’t work
Constructing it using the Developer Tools → Services UI gives this yaml:
service: tts.speak
data:
message: Testing one two three
language: en
options:
voice: en-us-kathleen-low
media_player_entity_id: media_player.lounge_speaker
cache: true
target:
entity_id: tts.piper
So it looks like you have everything right except the target at the end.
This one was on me as when I checked due to debugging had not included that I already had the target entity (lazy style on my part had it pushed down when trying some things), I am very sorry for that.
Did not work for me originally as the en was not recognised. I tried again in dev tools after your suggestion to see if I had botched something which is entirely possible. But it continued to suggest that piper does not recognise it.
Without the en reference the script was able to be called however failed to change it from the default voice, giving me the impression that it doesn’t seem yet to be capable of over-riding it with the option
I had to restart HA to get it to. I have another thread talking about being able to even change it in the assistant component. Still very early days in the release yet, so am expecting some of these types of things.
clearing cache works now for switching of the default. Was holding out hope this might have also been the key to using a non default voice, unfortunately still not able to change it within script.
Is there a character limit on the Piper? I have a rather long “Good Morning” script that plays fine with Google TTS, but Piper stops after a couple sentences. When I run the automation again, it actually picks up on where it left off and continues.
Anyone else experiencing this? The voice quality is unbelievably good! So I want to move completely away from Google TTS.
Edit: Interesting, “en-us-lessac-medium” reads the entire routine.
I have the same phenomenon with a long series of announcements.
I do the different announcements via a separate “service: tts.speak” actions and followed by a delay.