Text-To-Speech done speaking flag or TTS queuing

I have implemented TTS throughout my home and have various events announced. However, if one event fires an announcement and another fires before the first announcement is done, The announcements get messed up.

There is a Sonos script (https://www.home-assistant.io/cookbook/sonos_say/) that deals with this by introducing a delay after the announcement is submitted, but this assumes the time required to speak the announcement is known.

Ideally, it would be nice to have speech queue so that announcement conflicts can be resolved by queuing each speech request serially. Alternatively, a means of indicating a status of the announcement would be helpful so conflict can be delayed (held off) until the speech is complete.

Ha ha!
I’ve been battling with this for months…

You will be told that there are ways around this, I think the preferred method now is not to delay for a period of time but to wait until the media player changes state to playing and then to wait until the state changes to paused. You can also delay for the duration of the TTS as that is an attribute of the media player.

I can only assume this works for some people but for me the problem is that the state never changes on my media players. I don’t know if this is a ‘bug’ or some other failing in HA, or something wrong at my end but I’d love to know if it is something I can fix…

And all that doesn’t really address the need for some kind of queuing mechanism. I’ve been considering trying to write something but my Python skills are very limited (but much better than they were before I got into HA but still very limited!).

I’ll be watching this thread… :slight_smile:

1 Like

Thanks for the response & interest. I’ll have to look into using the media player feedback, but I suspect it will get messy when the announcements themselves are interrupting a music stream already playing.

Please be sure to up-vote this feature request.