Node-RED TTS Messages Truncated on Google Nest Hub

I am just getting back into Home Assistant after a bit of a hiatus. Since we will be moving in the next few months, and I will be getting my setup back online, figured that I would take some time to get reacquainted and to catch up on all of the changes.

To start, I created the simplest of flows, just an Inject and an Action, to speak to the display near me (using Piper), as seen here:

[{"id":"1604074c3f50e810","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"cdfb9b7aa46dd2cc","type":"api-call-service","z":"1604074c3f50e810","name":"","server":"c7f6bcf0.c0007","version":7,"debugenabled":true,"action":"tts.speak","floorId":[],"areaId":[],"deviceId":[],"entityId":[],"labelId":[],"data":"{\"message\":\"Hello.\",\"media_player_entity_id\":\"media_player.office_display\",\"entity_id\":\"tts.piper\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"all","blockInputOverrides":true,"domain":"tts","service":"speak","x":560,"y":140,"wires":[[]]},{"id":"252d72671acadef9","type":"inject","z":"1604074c3f50e810","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":360,"y":140,"wires":[["cdfb9b7aa46dd2cc"]]},{"id":"c7f6bcf0.c0007","type":"server","name":"Home Assistant","addon":true}]

I am simply posting a simple message to HA, using an Action node which is manually triggered. When I trigger the Inject node, the Nest Hub will chime, and there will be silence. Doing a bit of experimenting, I went ahead and made the message a bit longer. That is when I noticed that after the message reaches the Nest Hub, the first three or four seconds are not heard, but the rest is just fine.

If I put it back to the short message again, manually triggering it multiple times will still exhibit the same behavior. Copying/pasting the Action and running it multiple times in succession from the singular Inject still does not yield an audible result.

This all felt oddly familiar, but a search for similar issues that other people might have had has yielded no results. Has anyone seen this before, or know of any workaround to make sure that the device does not truncate the message?

First off you should try running this action in HA. There is a section in devtools “actions” where you can call the service. If it yields the same result, the problem lies in HA.

1 Like

Good call, thank you. I get exactly the same from the Developer Tools, unfortunately. Short of using another device to broadcast voice, I’ll likely need to find a node with SSML support to work around it, and add an explicit pause on the front-end.

I’m not familiar with the nest hub, is the chime some thing you are adding? I don’t see anything in your flow that would indicate you are, is the setting in the hub? There has been problems when trying to combine sound and tts in general.

If it can be disabled try this integration to combine the sound and tts message before it is sent to the hub. I believe if the tts services supports ssml you can use it.

I am not, but that is useful information for down the road.

I am literally just trying to get it to speak. The built-in chime on the device sounds, showing that HA has started to broadcast, and then there is a few seconds of silence before the stream starts playing. The first part of that stream (the text, itself) is what is getting lost. Digging out some of my old flows from backups, I see that when I was using Google Cloud, which supports SSML - and I was putting a puase at the start of everything that I was pushing. So, this seems like it is the hardware, itself, that is at fault here.

It is in incredibly ugly hack, but if I prepend my message with:

“W,… W,…”

That will fills the space that is cut off, allowing for my message to be heard clearly. I should be able to work around it more cleanly when Piper support for SSML is added, at least, if I am still using that device.

The Google device is part of my old setup, and I am likely not going to be using them in the future, though. Was more of a “what I have today” scenario. I will end up using something different for my assistants, just not sure what hardware, yet.

It’s likely the hub. You can install browser mod and then use your browser as a media player to test.

https://github.com/thomasloven/hass-browser_mod/blob/de87d5b4f57e2f0d02ad2868e5532ddcac296359/documentation/services.md