I am getting really close to a successful “morning brief” using ElevenLabs TTS. For the last few years, I’ve been using the Sonos API and the “say” command to read off a prepared script, pulling sensor data from weather, calendar, and other entities.
However, ElevenLabs TTS doesn’t consistently get through the script. And this morning, it’s even skipping bits of the message. I typically send the message with a Node-RED flow, but for testing purposes I’m using Dev Tools → Actions:
action: tts.speak
target:
entity_id: tts.elevenlabs_text_to_speech
data:
cache: true
media_player_entity_id: media_player.sonos_office
message: >-
Good morning. It is 8:03 on Monday, December 22.It is xx degrees and Partly
Cloudy in xxxxxxxxxxx. The temperature later will reach xx degrees, but it
will feel more like xx.Mixed precipitation tomorrow and Wednesday and on
Friday through next Monday, with high temperatures peaking at xx°F on
Wednesday.It looks like xxxx tomorrow.Sunset tonight is at x:xx. There are x
hours of daylight today. Sunrise tomorrow is at x:xx A.M.There is one
piece of mail arriving today.xxxxxx has xxxxxxxxxxx today.
Testing this morning… the first time, it made it through to about the “x hours of daylight” section and then stopped. In the repeated tests in the last few minutes, though, it’s only saying “Good morning it is sunri.”
I’ve tried with and without caching (true and false). I’ve also cleared the cache prior to each test with tts.clear_cache. Not sure what else could be causing this?
You likely have to add a delay after sending the TTS command long enough to make sure the end is not cut off.
You have quite a long message there, so it is possible you are running into a 255 character limit as well.
I’m not used to Node RED, so your milage may vary.
Your very long message works perfectly for me, with tts google translate uk, and generates 54 seconds of speech without either delay or stutter, even coping with “XXXXX”.
If you are testing this directly using HA Dev Tools → Actions, and it is not working there, there is no magic that will make it work in Node-RED. An ElevenLabs TTS issue?
Agreed, this isn’t a Node-RED problem. I can only point to ElevenLabs, or some delay/buffering issue.
It’s not as if it is only stopping early (though that does happen)… it’s skipping parts of the message, so there’s an issue beyond what a delay could fix.
I was hoping to generate and play a clip with Chime TTS, but I’m not able to get that integration to output anything yet.
EDIT: I just tried another test in Dev Tools. The TTS output for the text above is, “Good mor it is 8 there are.”
It’s possible. I did see that one… but you’d think that if it’s waiting for the entire message to render, then it would be complete when it plays. It’s not.
I would welcome a successful audio message even if it meant having a delay. In my use case, I trigger the tts.speak action after a short delay anyway and timing isn’t that critical… so I’d just factor in that delay.
I am still seeing this behavior from my TTS. When I put this through Dev Tools → Actions:
action: tts.speak
target:
entity_id: tts.elevenlabs_text_to_speech
data:
cache: true
media_player_entity_id: media_player.xxxxxxxxxxx
message: >-
Good morning. It is 11:02 on Wednesday, January 14.It is xx degrees and
Partly Cloudy in xxxxxxxxxx. The temperature later will reach xx degrees,
but it will feel more like xx.Light rain tomorrow, with high temperatures
falling to xx°F next Wednesday.There is a xx percent chance of rain today,
with less than one inch of accumulation.It's going to be very cloudy
today.Sunset tonight is at 7:33. There are 10 hours and 51 minutes of
daylight today. Sunrise tomorrow is at 6:22 A.M.There is one piece of
mail arriving today.
…it works, but it’s missing huge chunks of content and probably only delivers five words. It appears to be the integration that’s to blame.
EDIT: I just installed the Google TTS integration. It works. I’ll stick with that for now, though the ElevenLabs voices are way more lifelike.