Skip to main content
Lesson 7 of 18 · Realtime API and Voice Agents

Supported formats and languages

Lesson 7 of 18 Updated November 3, 2026 Developer
On this page
  1. Supported formats and languages
  2. Supported audio formats
  3. Supported languages
  4. Handling multilingual content
  5. Pricing
  6. Key takeaways

Update November 2, 2026 — Audio models. Several models in this course are deprecated: tts-1, tts-1-hd, and gpt-4o-mini-tts will shut down on January 6, 2027 (the indicated replacement is gpt-realtime-2.1-mini, which the OpenAI TTS guide states is not supported by /v1/audio/speech: speech synthesis migration moves to the Realtime API); gpt-realtime, gpt-4o-realtime, and legacy audio models on January 20, 2027 (gpt-realtime-2.1, gpt-realtime-2.1-mini, gpt-audio-1.5); whisper-1, gpt-4o-transcribe, and /v1/audio/translations on February 26, 2027 (gpt-transcribe, gpt-live-transcribe, v1/realtime/translations). For full-duplex voice, GPT-Live 1 has been available in the API since September 10, 2026. Lesson corrected November 3, 2026: examples updated from whisper-1 to gpt-transcribe (using the languages parameter), Whisper language count corrected (98, not “over 50,” per the File transcription guide), two-pass multilingual method replaced by gpt-transcribe language hints, pricing sourced. Sources: File transcription · GPT-Transcribe · Create transcription.

Supported formats and languages

OpenAI’s transcription models accept a wide variety of audio formats and support dozens of languages. Choosing the right input format and configuring the language correctly directly impacts transcription quality and costs. This lesson details the available options and best practices.

Supported audio formats

According to the API reference, the transcription endpoint accepts flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, and webm formats, provided the filename includes the correct extension. The most common ones:

Format Extension Compression Recommended use
MP3 .mp3 Lossy, good ratio Podcasts, voice recordings
MP4 / M4A .mp4, .m4a AAC lossy Videos, mobile recordings
WAV .wav Uncompressed Studio recordings
WebM .webm Opus lossy Browser recordings
FLAC .flac Lossless Maximum quality without loss
OGG .ogg Vorbis/Opus Open source applications

The maximum file size is 25 MB. For an MP3 at 128 kbps, this equals roughly 25 minutes of audio. For uncompressed WAV, it’s significantly less.

Optimizing file size

from pydub import AudioSegment

def optimize_for_transcription(input_path: str, output_path: str):
    """Converts an audio file to lightweight MP3, sufficient for speech."""
    audio = AudioSegment.from_file(input_path)

    # Convert to mono 16kHz (sufficient for speech)
    audio = audio.set_channels(1)
    audio = audio.set_frame_rate(16000)

    # Export as 64kbps MP3 (good quality/size compromise for voice)
    audio.export(output_path, format="mp3", bitrate="64k")

    return output_path

Supported languages

whisper-1 covers 98 languages, with accuracy varying by language. gpt-transcribe detects the language automatically; if you know which languages to expect, specify them in languages: ISO 639-1 codes (fr, en, es…), some ISO 639-3 codes (eng, spa, yue, cmn), and regional Chinese variants (zh-cn, zh-tw, zh-hk). An unsupported or malformed code will cause the request to fail.

# Automatic detection (default)
result = client.audio.transcriptions.create(
    model="gpt-transcribe",
    file=audio_file,
)
print(result.languages)  # languages recognized with sufficient confidence

# Expected languages
result = client.audio.transcriptions.create(
    model="gpt-transcribe",
    file=audio_file,
    languages=["fr"],
)

languages is a list, specific to gpt-transcribe; older models accept a single language in language. Never send both.

Common European languages

The most frequently used ISO 639-1 codes in Europe:

EUROPEAN_LANGUAGES = {
    "fr": "French",
    "en": "English",
    "de": "German",
    "es": "Spanish",
    "it": "Italian",
    "pt": "Portuguese",
    "nl": "Dutch",
    "pl": "Polish",
    "ro": "Romanian",
    "sv": "Swedish",
    "da": "Danish",
    "fi": "Finnish",
    "el": "Greek",
    "cs": "Czech",
    "hu": "Hungarian",
    "bg": "Bulgarian",
    "hr": "Croatian",
    "sk": "Slovak",
    "sl": "Slovenian",
    "et": "Estonian",
    "lv": "Latvian",
    "lt": "Lithuanian",
}

Handling multilingual content

An international meeting switches between languages. gpt-transcribe is designed for this case: its model card cites support for multiple language hints, multilingual audio, and code-switching within a single sentence. Provide all expected languages in a single pass:

with open("international-meeting.mp3", "rb") as f:
    result = client.audio.transcriptions.create(
        model="gpt-transcribe",
        file=f,
        languages=["fr", "en", "de"],
    )

print(result.text)
print("Recognized languages:", result.languages)

The old two-pass method, which detected the dominant language with whisper-1 in verbose_json mode and then re-transcribed by forcing that language, is no longer necessary: it forced a single language on the entire recording, and whisper-1 shuts down on February 26, 2027.

Pricing

Transcription is billed by the duration of audio processed: $0.0045 per minute with gpt-transcribe, according to its model card (November 2026). The file format therefore does not influence cost: only duration matters.

To reduce costs on large volumes:

from pydub import AudioSegment
from pydub.silence import split_on_silence


def preprocess_for_cost(file_path: str) -> str:
    """Removes silence to reduce billed duration."""
    audio = AudioSegment.from_file(file_path)

    # Remove silences longer than 1 second
    chunks = split_on_silence(
        audio,
        min_silence_len=1000,
        silence_thresh=-40,
        keep_silence=200  # Keep 200ms of silence for readability
    )

    if not chunks:
        return file_path

    combined = chunks[0]
    for chunk in chunks[1:]:
        combined += chunk

    output_path = "/tmp/optimized_audio.mp3"
    combined.export(output_path, format="mp3", bitrate="64k")
    return output_path

Key takeaways

  • The transcription endpoint accepts FLAC, MP3, MP4, MPEG, MPGA, M4A, OGG, WAV, and WebM, with a 25 MB limit per file
  • With gpt-transcribe, the languages list specifies expected languages; the response returns recognized languages
  • Mono 16 kHz MP3 at 64 kbps offers the best quality/size compromise for voice
  • Billing is per minute of audio: removing silence reduces costs
  • For multilingual content, a single pass with all expected languages in languages replaces the old two-pass method