Telegram Get File returns "application/octet-stream" binary > OpenAI Transcribe errors

Hi everyone! I have a self-hosted n8n. I’m trying to build a simple Telegram bot that transcribes my voice notes to myself. I have set up a simple workflow with a Telegram Message trigger, a Telegram Get File node, which then passes to an OpenAI Transcribe node. However, I’m getting the error:

Invalid file format. Supported formats: ['flac', 'm4a', 'mp3', 'mp4', 'mpeg', 'mpga', 'oga', 'ogg', 'wav', 'webm']

I see that the “Mime Type” for the binary output from the previous node is “application/octet-stream” which is probably what’s throwing it off. Even though the file extension is “.mp3” it doesn’t recognize the binary as an mp3 file.

So I even tried writing a JavaScript node that converts the MIME type to “audio/mpeg” and I still get the same error from the OpenAI node.

What can I do? :thinking:

Could you potentially provide an example of one of those audio files after downloading with n8n? I’d like to inspect it & test on the web.

Yeah, here’s the Downloaded file from from the Get File step:

It’s maybe worth noting that this was originally a Voice Memo recorded in iOS Voice Memos that was then shared into a Telegram chat. I don’t know how that would affect things though.

Interesting. Seems like a valid file to me.

Could you show the error screenshot and perhaps the inputs on runs?

Did you manually upload this to openai to see what would happen?

I gave up. Telegram simply does not support files from iOS Voice Memos, it seems.

Not sure if related, but I’ve been fighting with incorrect mime/types from Telegram get file node for hours, until I found this

This is for images, but you might need to manipulate the mime/type to the correct one for your audio manually using something like:

1 Like