Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

gpt-4o-transcribe client.audio.transcriptions.create fails on all supported audio types (“This model does not support the format you provided.”)

Đang mở
#2,477 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
api, audio-video-rtc

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện các lệnh gọi đã được báo cáo thông qua client.audio.transcriptions.create, sử dụng các ví dụ WAV, MP3, M4A và BytesIO trong issue. Kiểm tra đường đi của yêu cầu phiên âm và so sánh hành vi với whisper-1; công việc được xem là hoàn tất khi các đầu vào âm thanh được hỗ trợ không còn gây lỗi với gpt-4o-transcribe, hoặc ranh giới giữa thư viện và API được xác định rõ ràng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug
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

Ngôn ngữ chính
Python
Star
31.7k
Fork
6.8k
Merge trung bình
2 ngày 8 giờ
Pull request đã merge (30 ngày)
121

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của openai/openai-python

Tất cả issue của openai/openai-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.