I’m trying to get OpenAI’s TTS to work in my app. I’ve managed to generate MP3’s with this using python and I can load them into my app and play them just fine but playing them in app… I’m not even sure it’s possible.
I’m making a successful API call (so the Auth and Content-Type and end point are all OK):
I’m getting a response from the end point but it’s just 4x diamonds with ?'s in each one. I assume this is because it’s trying to send an MP3 back. If I just try to ‘play’ block the response, I get nothing.
So that was the arrangement I first went with for the base 64 decoding. That didn’t work here as it doesn’t seem like OpenAI is returning a JSON file - I’ve tried just printing what comes back to inspect it but it either comes out as null / the four diamonds.
What are the other two blocks though? At first I thought the green one was relating to a webviewer or video control but I don’t see “set X’s source…” block relating to either. I also don’t see it in the logic box (which is green). Is it an advance version of some other block?
Ditto the particular play arrangement you have there too. I don’t see an advanced vs of play which would let do that either.
Hmm looks like I might have to start from scratch (open an StP then convert to DnD and then rebuild…ugh Thunkable - this is the stuff that breaks my heart about this program).
Hello @nathanburley21656
A solution could be to use a backend service such as Xano or Firebase.
I mean to use a third-party API to call OpenAI API, and then store the files from the response on your backend and return it as a URL on Thunkable.