Hi, I’m adding myself to the list of people suffering from this problem (as of November 27th, 2023).
Like xacto pointed out, this is still an issue even though the thread is marked as resolved. cc @michellep
I’ve gone through this thread and others and observed the same behaviour described by 0x41mmar (the .mp3 file encoded on safari -iOS and macOS- always returns an error Invalid file format. Supported formats: ['m4a', 'mp3', 'webm', 'mp4', 'mpga', 'wav', 'mpeg']
even though the audio file runs fine on my machine. Also tried with .webm, same issue).
My setup:
- a Next.js app (v14) built from the vercel/ai/next-openai boilerplate from Vercel.
- using
MediaRecorder
client-side to record audio - and
openai.audio.transcriptions.create()
to send the audio to OpenAI server-side, edge runtime.
I don’t want to invest in a solution using ffmpeg as I’m just making a prototype at the moment.
I tried the solution proposed by @jonnylangefeld, but somehow the audio-recorder-polyfill
just returns a silent file for me (the length is correct, but input sound is not encoded). I still need to try a couple things that have been mentioned here.
Overall I find this very frustrating because everyone in this thread seems to be using various workarounds to the same problem, which sounds like it could be resolved in a more straightforward way on OpenAI’s end.