Like many others here I have a Google TTS morning announcement set up to play every day. It is fairly typical in that it choses a random greeting, gives the current weather conditions, then a forecast and then chooses a random goodbye.
All fairly standard and it works beautifully.
Most of the time.
TL:DR Sometimes it will start speaking and then for some reason just stop. It is not always in the same place that it stops and neither is it at a natural break.
Does anyone experience this?
I wonder why this happens?
There are so many ‘points of failure’ in the process but I have considered:
- WiFi - possibly something happens mid announcement?
DarkSky - possibly something in the text DarkSky generates isn’t compatible with TTS?Google - the TTS service sometime is not processing properly?- Sonos - the Sonos service is not processing properly?
- My code - obviously(!) a possibility but it does work beautifully probably 4 times out of 5
Also,
I have tried two ways of generating the announcement. Firstly I tried creating it ‘on-the-fly’ i.e.each element was generated within the message
of the tts.google
_say.
I thought maybe the problem might have been the on-the-fly processing (even though I didn’t believe it especially as that is how others do it) so I changed the whole process to generate the message as before but this time publish the whole thing as one string to MQTT which would then trigger tts.google_say
with just that string; no processing required. Still the same result.
EDIT: Furthermore the .mp3 file in the tts cache has the complete message which I can re-play at will which precludes any google error or something strange with the DarkSky text, so for some reason my Sonos doesn’t always play the whole message.