How to Convert an Audio File to Base64 in Thunkable?

Hi,

I have reviewed all similar post and tried other forums such as ChatGPT before posting this message here.

I’m working on a project where I record an audio file in Thunkable and then send it to Google Speech-to-Text API. Since Google requires the audio in Base64 format (or a Google Cloud Storage URL), I need to convert the recorded audio file to Base64 before making the API request.

So far, I have:

  1. Recorded audio in Thunkable (getting a Blob URL).
  2. Uploaded it to Cloudinary (I now have a Cloudinary URL).
  3. Now I need to convert the file to Base64 before sending it to Google Speech-to-Text API.

Question:

  • Is there a built-in way in Thunkable to convert an audio file to Base64?

Thanks

Hello @sheia_anandpc2f4k
There is no build in way to convert an audio file to base64 but you can create an HTML code to make the conversion.

Here is an example that converts the image file to base64: https://community.thunkable.com/t/web-api-firebase-storage-it-does-not-upload-the-file-to-the-server/2369895/4

1 Like

Thanks, Will try this solution.