Google API Text-to-speech

I made the call, now I just need to figure out how to play it

So you are good and able to make the call now? And receive the audio content as a base 64 encoded string that decodes to mp3 binary? (based on what I am seeing in your screenshots, you are doing mp3 so you are good there, I just wanted to make sure you can successfully get the audio content back).

If so, use the audio player element and in the dynamic link field, do the following:


That’s all there is to it. Took me a while to figure out that this would work on Sunday after trying a bunch of other things so hopefully I’ve saved you some time before you went down the rabbit hole on this one :grinning:


Amazing!!! It’s working!!

Thank you! @ryanellman

1 Like

Cool! I’m glad it helped!


Was anyone able to get the Speech to text flow working with Google Cloud? Tried that a while back but I think I had issues with audio encoding. The audio file needs to be recorded in Bubble.

I haven’t done speech to text, only text to speech. But if you describe some of the roadblocks you hit or error messages you were receiving, I may be able to help you work through them

How did you bring the private key into the API connector input? I am trying to copy and paste it but it’s not working, it’s really long and looks like very easy to mess up and inefficient to try typing by hand

I’ve copied into a notepad, and replaced every “\n” for a breakline.

You can replace the \n manually or using the Edit -> Substitute

thanks for the help, this thread is awesome :slight_smile:

Sorry, I am not as technical as you,

So you removed \n with \

And you copied from notepad and pasted with this action?

I’m foto2

Got it with a ctrl + C and then crtl + V )))

Thank you again for the help


you need to replace with an enter… ex: this\nis\nyour\nkey\n—


done, I’ve been playing around with the JSON, I’m not sure what is wrong with it, I copied it line by line from the example

I am interested in purchasing your app that is already connected to Google text to speech API, and just updating the API key

can you send a print?

Paint over part of the key, email and stuff

try copying this in the input:

“audioConfig”: {
“audioEncoding”: “LINEAR16”,
“pitch”: 0,
“speakingRate”: 1
“input”: {
“text”: “text (you put the symbols to be optional here)”
“voice”: {
“languageCode”: “ru-RU”,
“name”: “ru-RU-Standard-E”

your key is too small…

replacing the “\n” parts for the enter, you should have a text of 26 lines, all the same lenght…

I see that there still are some “\n” in your key there, you need to replace them all.

another thing, you don’t need any of those parameters, you can delete them.

Just the text in the Body (JSON object …) is enough.

To change the parameters you need to insert the text in the <> symbols for dynamic values

Thanks for the tip

I just noticed all the lines are not the same length but found all of the /n’s