Supergiovane / node-red-contrib-tts-ultimate

This node transforms a text into a speech audio. You can hear the voice natively through Sonos or external players.
MIT License
24 stars 5 forks source link

delay before TTS #32

Closed tinimark closed 3 years ago

tinimark commented 3 years ago

Love this node, working fine for me except when it interrupts music you can hear the volume change on the current playlist just before it reads the message. Also there seems to be quite a delay from when the msg is sent to when it is being played. It's about 8 seconds or so. Anything I can do from my end to speed that up?

Supergiovane commented 3 years ago

Hi 8 seconds are way too much. Normally, it takes about 1 or 2 seconds to start playing. There is something wrong. On what hardware are you running nodered? Do you play everytime the same text, or it changes?

tinimark commented 3 years ago

Thanks for the quick reply. Running Hassos on a dedicated i5 box. Everything else working fine. I can send a TTS using the HA sonos card and it plays instantly but of course doesn't revert back to the queue after playing. I'm playing the same message each time.

Supergiovane commented 3 years ago

I’ve understood. Nodered is running behind homeassistant. Please check that the port used by tts-ultimate are open. Running nodes behind homeassistant, docker or something like this, requires port forwarding

tinimark commented 3 years ago

ah that's great I'll check that out and let you know. Thank you! :)

Supergiovane commented 3 years ago

PS: please try to use an ownfile node to play one of the demo texts. In this case, trs ultimate will not contact the tts online service to download the mp3 of the tts file. Let me know if it’s more speedy. You can, also, try to change the tts service (polly, or google)

tinimark commented 3 years ago

Brilliant. I'll give it a go!

Supergiovane commented 3 years ago

Hi tinimark, are you skilled enough to replace a file into your .node-red folder?

tinimark commented 3 years ago

Good morning! Yes, I have access to \HASSIO\config\node-red Port forwarding didn't seem to improve anything but I may well have done that wrong.

image

Supergiovane commented 3 years ago

Hello ok, so please unzip this zip into your .node-red/node_modules/node-red-contrib-tts-ultimate/ttsultimate folder and restart nodered. ttsultimate.js.zip

This should fix the first issue about playlist volume. Please try it and let me know. Next step, will investigate the 8 seconds issue.

tinimark commented 3 years ago

Yes, brilliant, that worked for the volume issue :) The delay is about 8 to 10 seconds to play the file and then about another 8 to 10 seconds for the queue to resume.

tinimark commented 3 years ago

this might help? image

Supergiovane commented 3 years ago

Hi yes. That is. Have you added some additional players in the config window?

Supergiovane commented 3 years ago

I mean here:

Node-RED
tinimark commented 3 years ago

No, I only have one Sonos device.

Supergiovane commented 3 years ago

Hi can you send me the same screenshot i sent you? I need to view if there's an empty row.

tinimark commented 3 years ago

That was it! There was an empty node in additional players. I deleted it and the delay has gone. Amazing work, Max. Grazie and have a great day.

Supergiovane commented 3 years ago

Prefect. I'll publish the official updated release tomorrow. In the meantime, you can live with the fix i sent you. Cheers and... please star my node.