Get text-to-speech result as a variable rather than having it play?

Is it possible to get text to speech with an output of a sound which can be an input or output?
Like this mockup:
untitled script pic (8)

The primitives of the block can't be used, so the only options I can think of is making my own tts system or some sort of api request somewhere.

Having a little dig down, I don't think the underlying speech API easily allows the generated sound to be stored.

So probably best bet is to use another API

Okay thanks cymplecy. I'll see what i can find

JFI Inside of Node-RED, I use a node, that lets my Pi speak to my Alexa, that uses a free Google TTS service but I haven't been able to drill down enough thru that code to find out how it actually forms the request.

There's lots of stuff out on the internet about using Google TTS but lots of its seems old, out-of-date info

One thing to note - the node caches requests - i.e. it saves the returned wav/mp3 file and so if a call is made using the same text - it doesn't call out to Google - it just returns the already cached file.

This seems a good idea so as not to run into rate limits

So maybe an idea to try and use browser storage for that (once you've got the actual code working of course) :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.