I have my Sonos Play 5 replaced by a Sonos Five speaker.
My original TTS script was not working good anymore with this new speaker (i was using the sonos snapshot/restore services and some delays).
But i saw that there are improvements now to use an announcement as TTS on a speaker.
But I have some problems. The requirements are:
- TTS as an announcement over the play musing (so no stop and restore anymore)
- the TTS must have a specific volume level.
In my config I have this specified:
# Text to speech
tts:
- platform: google_translate
cache: true
cache_dir: /tmp/tts
time_memory: 300
service_name: google_say
Option A:
service: tts.google_say
data:
entity_id: media_player.sonos_woonkamer
message: De wasmachine is gereed
language: nl
With option A I have my text announced over the music and with my Dutch (nl) language. The problem is that I can’t set the volume I think (I don’t want to have a construction to store the current volume level, increase it, do the tts and restore it to the saved volume level).
Option B:
service: media_player.play_media
data:
announce: true
media_content_id: media-source://tts/google_translate?message="De wasmachine is gereed"
media_content_type: music
extra:
volume: 50
target:
entity_id: media_player.sonos_woonkamer
With Option B I have my text announced over the music with a specific volume level. But the problem is that I don’t know how to specify my language. Now it is announced english instead of dutch (nl).
How can I combine those 2 things that it work correct?