When using tts.cloud_say on a Sonos speaker that’s already playing music I’d like to pass the volume parameter that you are able to pass via media_player.play_media when manually passing announcement parameter. Is this possible?
More Background
I noticed today that if am playing musing on my Sonos and then use tts.cloud_say to say something on the device it’ll lower the volume and play what needs to be said. I see in the Sonos integration documentation that this is a function of the announce property that apparently is being handled on the backend.
What I Tried
service: tts.cloud_say
data:
entity_id: media_player.bedroom
message: >
My message here
cache: false
options:
volume: 0.1
Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This helps users find answers to similar questions.
I tried this with Google Translate as the TTS engine (I don’t have access to Nabu Casa’s TTS) and it didn’t convert %21 to an exclamation mark (it said ‘good evening quote’).
I suggest you consider posting your question in a new topic, where more users are likely to see and answer it, than appending it to a topic that was solved 10 months ago.
I don’t think there’s a way to specify voice or language when using Nabu Casa’s media-source://tts/cloud endpoint. I was also looking for the same, but it seems the only options are to use the more limited tts.cloud_say service (which allows you to configure TTS, but no controls for announce, volume, etc) OR to use the service media_player.play_media with the TTS endpoint, but then no ability to customize the TTS parameters.
That’s a bummer. Hope Nabu Casa folks implement this soon on TTS endpoint.
If you only need a handful of fixed messages, you could generate static files for each, and then use media_player.play_media. But every time you want to change the message you’d have to regenerate the files, so it gets boring pretty quickly.
PSA, you can set the new voice variants (2025.5) by adding ||<variant> after the voice query parameter. e.g. media-source://tts/cloud?language=en-US&voice=JennyNeural||whispering&message=test