Hypnos3/node-red-contrib-cast

save tts as file?

Closed this issue · 4 comments

ozett commented

is there a way to save the tts results as a file (wav/mp3) somehow, somewhere (for re-use)?

thx,
ozett

Yes, that is possible.

Usually, tts has generated a link that will be passed to the Google API. (There is no file or so given, but that is the Google API internally and this only wants a URL.)

Of course, you can also download the MP3 file and save lokan. (For example, the MP3 file can also be obtained using the node-red-contrib-google-ts node.)
But then you need a web server (this can be node red) that provides a link to this file, which can be passed to the Google API.

I'm not sure if this link can only be reached on the local network or over the Internet.

To pass on the URL this node already provides everything necessary.

ozett commented

how do i discover the URL for my tts-> mp3 out of the cast-node?
thx.
realy promising (i have downloading soundfile from url elsewhere on my node-red in use. great!)
-------add-on:
oops: i did the url-download like in example 3 here:
https://raw.githubusercontent.com/Hypnos3/node-red-contrib-cast/master/images/example3.png

still i cannot see how to save the output of the tts-api as file. at the moment is see only, that the cast-node takes text, sends to the tts-api, and casts to my google-mini device. All closed within the cast-node. or am i wrong? where to jump in to save the api-return or where to grab the url and save it... 😕

There is currently no build in was to get the url of the tts out of the cast node. But the cast node does nothing other as the node-red-contrib-google-ts node does. So you can also use the node-red-contrib-google-ts node to get the url of the mp3 file.

ozett commented

thx for clearing this up, i will see an try to use this way with node-red-contrib-google-ts. ->google-tts!
thx