I am finally getting around to trying the new overlay feature for Sonos to streamline my announcements and cannot get it to work. I start a playlist on Sonos (Youtube Music, Plex, etc.) and when I play the announcement the playlist stops and does not overlay the announcement over the music. The announcement plays fine but the playlist stops. Any ideas? Below is a sample script.
service: media_player.play_media
data:
media_content_id: media-source://tts/google_translate?message="I am very loud"
media_content_type: music
announce: true
extra:
volume: 80
target:
entity_id: media_player.great_room
I am beginning to wonder if the Sonos speakers need the be the latest generation. Currently, mine are all S1 generation. I have a Play 5, a Play 3 and an IKEA Symfonisk. Does this new feature require S2 speakers?
I have a mix of S1 and S2 devices and use the following for them all, when executed is lowers the volume of what is currently playing and plays the message on top. I happen to be using google cloud but the same works regardless of the TTS service.
service: tts.google_cloud_say
data:
entity_id: media_player.sonoslivingroom
message: test message
I figured out what the problem was. All three of my speakers were running the S1 OS firmware. The Play 3 and the Symfonisk both support the S2 OS so I updated them both and now everything works as advertised. I hope this can help someone else if the future. The documentation should be updated to note this.
BTW is anyone using the Chimes TTS HACs integration for announcements? It works great with the main feature being combining a sound effect with TTS before sending it to the media device. The only thing I am surprised it doesnât support is sending to multiple speaker entities at once.
Yeah, but then the point of using HA to group/ungroup based on presence is lost in my case.
Was hoping not to fiddle with the Sonos app.
I can play media, etc to all speakers right now so the tts announcement should have been possible in the same mannerâŚ
Btw. Iâm unsing the mediaplayer join and unjoin function (and the speakers do group in the sonos app)
The developer who maintains the Sonos integration implemented support for announce in version 2023.5.0 and hereâs jjlawrenâs description of the feature:
The new announce behavior avoids the need to snapshot/regroup/etc and will play over any currently playing music without interruption.
The tradeoff is that you need to explicitly target all rooms/speakers where youâd like the announcement to play and they are called individually, so audio playback may not be perfectly synced.
tl;dr
Sonos announce feature doesnât currently support playing to all members of a grouped set of speakers.
NOTE
Itâs my understanding that if the target speaker is a stereo pair, the announcement will only play via one of the paired speakers.
Be advised that the difference between your example and whatâs in the first post is that theadlee is using the optional volume property. The documentation warns that it may not be supported on S1 speakers
The documentation already states notes it. See the screenshot I posted above.
Contact its author. I believe others have already requested this enhancement.
It would involve using the traditional snapshot/group/play/restore technique as opposed to using announce because announce doesnât natively support prepending a sound effect (or anything else) to TTS.
FWIW, I currently use a script to do that, optionally playing a âpreambleâ prior to the announcement.
I have been in contact with the Chime TTS author @Nimrod_Dolev. He has made the enhancement to support multiple speakers. He is merging the âpreambleâ with the TTS into one mp3 so the announce feature still works.
theadlee indicated you will be âmerging the âpreambleâ with the TTS into one mp3â. What are you using to do that?
FWIW, in the script that I mentioned above, it plays the two MP3 files (preamble and announcements) one after the other. It waits until the preamble is finished before starting to play the announcement.
Hi @123 , I wrote a custom integration called Chime TTS which is written in Python.
It adds a new service (chime_tts.say) to Home Assistant which allows you join audio files before and/or after TTS audio to form a new local mp3 file, played in a single service call to your media_player/s without any lag.
The service is configurable, so you can do things like specify how long of a delay you want to insert between the audio and TTS, change the speed of the TTS audio, and supports the various language-specific parameters available in Google Translateâs and Nabu Casaâs TTS services.
A very quick question: Is it best to list speakers individually and have Chime_TTS group them, or simply create a helper Media group.
The reason I ask is that I have six Sonos speakers around the house in various rooms. Currently, theyâre in a helper group called âsonos-speakersâ. When I play a Chime_TTS message to this entity (not a device), they do play, but are slightly out of sync.
Another approach might be to simply list all the speakers individually as devices, then check the âJoin Speakersâ box? (I was hoping to avoid this, so I could add/remove speakers without editing every automation that uses Chime_TTS.)
Is there a Best Practices approach to this?
UPDATE:Just tried to list the Sonos speakers individually and use the âjoin speakersâ option. Didnât work. The annoucement only played on the first device listed. When I changed it back to the entity :Sonos Speakers", then it played on all of them, but slightly out of sync.