Wan3.0, GLM-5.3 Flash, and Qwen3.8 Flash are now live on CometAPI โ†’
ai-model/CometAPI research

GPT-4o Audio API

GPT-4o Audio API: A unified /chat/completions endpoint extension that accepts Opus-encoded audio (and text) inputs and returns synthesized speech or transcripts with configurable parameters (model=gpt-4o-audio-preview-, speed, temperature) for batch and streaming voice interactions.

CometAPI
annaAI model and API research team
Updated Sep 3, 2026 6 min read
GPT-4o Audio API
Use this pattern

Make the first API call.

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_COMETAPI_KEY",
    base_url="https://api.cometapi.com/v1",
)

response = client.chat.completions.create(
    model="gpt-5-mini",
    messages=[{"role": "user", "content": "Build this workflow."}],
)

print(response.choices[0].message.content)

GPT-4o Audio API: A unified /chat/completions endpoint extension that accepts Opus-encoded audio (and text) inputs and returns synthesized speech or transcripts with configurable parameters (model=gpt-4o-audio-preview-<date>, speed, temperature) for batch and streaming voice interactions.

Basic infornation of GPT-4o Audio

GPT-4o Audio Preview (gpt-4o-audio-preview-2025-06-03) is OpenAIโ€™s newest speech-centric large language model made available through the standard Chat Completions API rather than the ultra-low-latency Realtime channel. Built on the same โ€œomniโ€ foundation as GPT-4o, this variant specialises in high-fidelity speech input and output for turn-based conversations, content creation, accessibility tools, and agentic workflows that do not require millisecond timing. It inherits all text-reasoning strengths of GPT-4-class models while adding end-to-end speech-to-speech (S2S) pipelines, deterministic function calling, and the new speed parameter for voice-rate control.


Core Feature Set of GPT-4o Audio

โ€ข Unified Speech-to-Speech Processing โ€“ Audio is transformed directly to semantically-rich tokens, reasoned upon, and re-synthesised without external STT/TTS services, yielding consistent voice timbre, prosody, and context retention.
โ€ข Improved Instruction Following โ€“ June-2025 tuning delivers +19 pp pass-at-1 on voice-command tasks versus the May-2024 GPT-4o baseline, reducing hallucinations in domains such as customer support and content drafting.
โ€ข Stable Tool Calling โ€“ The model outputs structured JSON that conforms to the OpenAI function-calling schema, enabling backend APIs (search, booking, payments) to be triggered with >95 % argument accuracy.
โ€ข speed Parameter (0.25โ€“4ร—) โ€“ Developers can modulate speech playback for slow-paced learning, normal narration, or rapid โ€œaudible skimโ€ modes, without re-synthesising text externally.
โ€ข Interrupt-Aware Turn-Taking โ€“ While not as latency-driven as the Realtime variant, the preview supports partial streaming: tokens are emitted as soon as they are computed, allowing users to interrupt early if necessary.


Technical Architecture of GPT-4o

โ€ข Single-Stack Transformer โ€“ Like all GPT-4o derivatives, the audio preview employs a unified encoderโ€“decoder where text and acoustic tokens pass through identical attention blocks, promoting cross-modal grounding.
โ€ข Hierarchical Audio Tokenisation โ€“ Raw 16 kHz PCM โ†’ log-mel patches โ†’ coarse acoustic codes โ†’ semantic tokens. This multi-stage compression achieves 40โ€“50ร— bandwidth reduction while preserving nuance, enabling multi-minute clips per context window.
โ€ข NF4 Quantised Weights โ€“ Inference is served at 4-bit Normal-Float precision, cutting GPU memory by half compared to fp16 and sustaining 70+ streaming RTF (real-time factor) on A100-80 GB nodes.
โ€ข Streaming Attention & KV Caching โ€“ Sliding-window rotary embeddings maintain context over ~30 s of speech while keeping O(L) memory usage, ideal for podcast editors or assistive reading tools.


Versioning & Naming โ€”ย Preview Track with Date-Stamped Builds

IdentifierChannelPurposeRelease DateStability
gpt-4o-audio-preview-2025-06-03Chat Completions APITurn-based audio interactions, agentic tasks03 Jun 2025Previewย (feedback encouraged)

Key elements in the name:

  1. gpt-4oย โ€“ Omni multimodal family.
  2. audioย โ€“ Optimised for speech use-cases.
  3. previewย โ€“ API contract may evolve; not yet GA.
  4. 2025-06-03ย โ€“ Training & deployment snapshot for reproducibility.

How to callย GPT-4o Audio API API from CometAPI

GPT-4o Audio APIย API Pricing in CometAPI:

  • Input Tokens:ย $2ย /ย Mย tokens
  • Output Tokens:ย $8ย /ย Mย tokens

Required Steps

  • Log in toย cometapi.com. If you are not our user yet, please register first
  • Get the access credential API key of the interface. Click โ€œAdd Tokenโ€ at the API token in the personal center, get the token key: sk-xxxxx and submit.
  • Get the url of this site:ย https://api.cometapi.com/

Useage Methods

  1. Select the โ€œgpt-4o-audio-preview-2025-06-03โ€ endpoint to send the request and set the request body. The request method and request body are obtained from our website API doc. Our website also provides Apifox test for your convenience.
  2. Replace <YOUR_API_KEY> with your actual CometAPI key from your account.
  3. Insert your question or request into the content fieldโ€”this is what the model will respond to.
  4. . Process the API response to get the generated answer.

For Model Access information in Comet API please seeย API doc.

For Model Price information in Comet API please seeย https://api.cometapi.com/pricing.

API Workflow โ€”ย Chat Completions with Audio Parts & Function Hooks

  1. Input Formatย โ€“ย audio/*ย MIME orย base64ย WAV chunks embedded inย messages[].content.
  2. Output Optionsย โ€“
    โ€ขย mode: "text"ย โ†’ pure text for captioning.
    โ€ขย mode: "audio"ย โ†’ returns aย streamingย Opus or ยต-law payload with timestamps.
  3. Function Invocationย โ€“ Addย functions: ย schema; the model emitsย role: "function"ย with JSON arguments; the developer executes the tool call and optionally pipes the result back.
  4. Rate Controlย โ€“ Setย voice.speed=1.25ย to accelerate playback; safe ranges 0.25โ€“4.0.
  5. Token/Audio Limitsย โ€“ 128 k context (~4 min speech) at launch;ย 4096 audio tokens / 8192 text tokensย whichever first.

Sample Code & API Integration

pythonimport openai

openai.api_key = "YOUR_API_KEY"

# Single-step audio completion (batch)

with open("prompt.wav", "rb") as audio:
    response = openai.ChatCompletion.create(
        model="gpt-4o-audio-preview-2025-06-03",
        messages=[
            {"role": "system", "content": "You are a helpful voice assistant."},
            {"role": "user", "content": "audio", "audio": audio}
        ],
        temperature=0.3,
        speed=1.2  # 20% faster playback

    )

print(response.choices.message)
  • Highlights:
  • model: "gpt-4o-audio-preview-2025-06-03"
  • audio key in user message to send binary stream
  • speed: Controls voice rate between slow (0.5) and fast (2.0)
  • temperature: Balances creativity vs. consistency

Technical Indicators โ€”ย Latency, Quality, Accuracy

MetricAudio PreviewGPT-4o (Text-Only)Delta
First Token Latency (1-shot)1.2 sย avg0.35 s+0.85 s
MOS (Speech Naturalness, 5-pt)4.43โ€”โ€”
Instruction Compliance (Voice)92 %73 %+19 pp
Function Call Arg Accuracy95.8 %87 %+8.8 pp
Word Error Rate (Implicit STT)5.2 %n/aโ€”
GPU Memory / Stream (A100-80GB)7.1 GB14 GB (fp16)โˆ’49 %

Benchmarks executed via Chat Completions streaming, batch size = 1.

See Also GPT-4o Realtime API

GPT-4o Audio

Continue learning

Connect this article to the next decision.

View all topics
Published on Jun 3, 2025
Last updated Sep 3, 2026
90 views
Reviewed for clarity, source attribution and current API terminology.

Ready to cut AI development costs by 20%?

Start free in minutes. Free trial credits included. No credit card required.

Read More