gpt-4o-transcribe client.audio.transcriptions.create fails on all supported audio types (“This model does not support the format you provided.”)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 31.6k
- Forks
- 5.7k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 96
Description
Confirm this is an issue with the Python library and not an underlying OpenAI API
- This is an issue with the Python library
Describe the bug
When calling client.audio.transcriptions.create(model="gpt-4o-transcribe", file=...) I consistently receive:
openai.BadRequestError: Error code: 400 - {'error': {'message': 'This model does not support the format you provided.', 'type': 'invalid_request_error', 'param': 'messages', 'code': 'unsupported_format'}}
regardless of supplying the file as:
- wav (PCM‑16, 16 kHz, mono)
- mp3
- m4a (AAC)
- an in‑memory BytesIO buffer with .name set to the proper extension
The same code works fine with the whisper-1 model, but gpt-4o-transcribe/mini always rejects the input, even though I have verified via ffprobe/sox that my files are valid PCM‑16 WAV, standard MP3, or AAC.
To Reproduce
from openai import OpenAI
from dotenv import load_dotenv
from io import BytesIO
import os
load_dotenv()
client = OpenAI()
# 1) Try WAV on disk
with open("audio.wav", "rb") as f:
resp = client.audio.transcriptions.create(
model="gpt-4o-transcribe",
file=f
)
print(resp)
# 2) Try MP3 on disk
with open("audio.mp3", "rb") as f:
resp = client.audio.transcriptions.create(
model="gpt-4o-transcribe",
file=f
)
print(resp)
# 3) Try M4A on disk
with open("audio.m4a", "rb") as f:
resp = client.audio.transcriptions.create(
model="gpt-4o-transcribe",
file=f
)
print(resp)
# 4) Try BytesIO wrapper
data = open("audio.wav", "rb").read()
buffer = BytesIO(data)
buffer.name = "audio.wav"
buffer.seek(0)
resp = client.audio.transcriptions.create(
model="gpt-4o-transcribe",
file=buffer
)
print(resp)
Code snippets
from openai import OpenAI
from dotenv import load_dotenv
load_dotenv()
client = OpenAI()
audio_file = open("temp/audio.wav", "rb")
transcription = client.audio.transcriptions.create(
model="gpt-4o-transcribe", file=audio_file
)
print(transcription.text)
OS
Windows 11
Python version
3.13
Library version
openai==1.97.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported calls through client.audio.transcriptions.create using the WAV, MP3, M4A, and BytesIO examples in the issue. Inspect the transcription request path and compare behavior with whisper-1; done means the supported audio inputs no longer fail for gpt-4o-transcribe, or the library/API boundary is clearly identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, audio-video-rtc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100