Whisper API returns 524 error on .mp3 files larger than 12 MB

Just curious if anyone else is having this issue. Been happening since yesterday afternoon on code that I wrote for my mother’s practice, which has been working for ~4 months without this issue. Key details:

Requests hang for a couple minutes then return the following error:
openai.InternalServerError: Error code: 524 - {‘error’: {‘code’: 524, ‘message’: ‘Gateway timeout.’, ‘param’: None, ‘type’: ‘cf_gateway_timeout’}}

Code:

from openai import OpenAI
import sys
OAI_client = OpenAI()
audio_file = open(sys.argv[1], "rb")
transcript = OAI_client.audio.transcriptions.create(
    model="whisper-1", 
    file=audio_file, 
    response_format="text"
  )

print(transcript)

This is what im running in my git bash terminal

py test.py "audio_files/bigsample.mp3"

Seems like they may have inadvertently lowered the file size limit or something. Please let me know if you’ve experienced anything similar. Thanks.

This is happening for me for smaller files as well, works for some, not others. Really want to get a resolution from this or hear others’ suggestion for workaround; my production app depends on it.

@elin44 for a workaround: I use SYSTRAN/faster-whisper (on GitHub) to transcribe locally. Same accuracy as the online API, but MUCH slower and memory-hungry. But it could be a (slow) workaround while this 524 issue gets fixed (I also get the error on 18MB file). You could use the official openai/whisper as well, but faster-whisper is more performant. Hope it helps.

Yeah this is really bad it’s failing for me and my biggest customers are complaining…

Thanks all for the confirmation. I tested it this morning, and the issue seems to be fixed.