I’m trying to transcribe WhatsApp audio using Google Gemini API. I filtered the message type, downloaded audio file to get the binary and used the HTTP request node for Google Gemini API to transcribe the audio. After searching from the internet I found out that I need to pass the audio file after converting it to base64. I’m using the following JSON Body to pass the data to Google Gemini API but so far I’ve been unsuccessful. Following is the JSON body:
To convert binary to base64 you can use the Extract from File node.
Also changed the Response type of Download Audio node and updated the Document in HTTP Request node.
Thanks @Franz. That was very helpful. But when I use the JSON provided by you in the last node “HTTP Request”, an error comes which is: “JSON parameter needs to be valid JSON”