Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#2,477 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@LuminaX-alt がすでに取り組んでいます。

2025年7月31日 から。

  • #8 @LuminaX-alt による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python

調査の方向性

まず、issue にある WAV、MP3、M4A、BytesIO の例を使い、client.audio.transcriptions.create 経由で報告された呼び出しを再現します。文字起こしリクエストの経路を調査し、whisper-1 と動作を比較します。完了の条件は、サポート対象の音声入力が gpt-4o-transcribe で失敗しなくなること、またはライブラリと API の境界が明確に特定されることです。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Python
スター
31.8k
フォーク
7.3k
平均マージ
1日 3時間
マージ済み PR(30日)
131

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

openai/openai-python のほかの issue

openai/openai-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。