I will use Google Text to Speech to create an mp3 audio file from a text I provide. But it is returned in base64 encoding. Is there an API to create a file in Glide, based on content in base64 format?
Out of curiosity, if you point the audio component to that base64 result, does it still work? I think it works for images, but never tried it with audio.
I think the audio component wants to receive a URL as text, then it will try to download a mp3 file from that address, then play the file. But I could try whether it also accepts file contents as a text in base64.
A few of us have used base64 encoded data uri’s in various ways, so I feel that it’s possible. Based on some initial google searching it appears that people have had positive results using encoded data with html audio components, which is what Glide uses as their audio component. I don’t know if size could ever be an issue though. Maybe first try it with audio that’s only a couple of seconds long.
Thanks for the hint, that Glide has a built-in integration with OpenAI, including a Text-to-Speeach service. I set it up today, paying 10$ into my existing OpenAI personal trial account. And it works nicely.
English text is read aloud nearly perfect.
I also tried a German text. It is good in general, but some words are pronounced a bit like in English, like a English native speaker that has a good command of German, but still slips into pronouncing some words the English, not the German way.
Should be good enough for minimum viable product.
The cost seems to be $0.01 per API call. Too much for production use, but OK for MVP trials.