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
| Identifier | Channel | Purpose | Release Date | Stability |
|---|---|---|---|---|
| gpt-4o-audio-preview-2025-06-03 | Chat Completions API | Turn-based audio interactions, agentic tasks | 03 Jun 2025 | Previewย (feedback encouraged) |
Key elements in the name:
- gpt-4oย โ Omni multimodal family.
- audioย โ Optimised for speech use-cases.
- previewย โ API contract may evolve; not yet GA.
- 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
- 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. - Replace <YOUR_API_KEY> with your actual CometAPI key from your account.
- Insert your question or request into the content fieldโthis is what the model will respond to.
- . 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
- Input Formatย โย
audio/*ย MIME orยbase64ย WAV chunks embedded inยmessages[].content. - Output Optionsย โ
โขยmode: "text"ย โ pure text for captioning.
โขยmode: "audio"ย โ returns aย streamingย Opus or ยต-law payload with timestamps. - 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. - Rate Controlย โ Setย
voice.speed=1.25ย to accelerate playback; safe ranges 0.25โ4.0. - 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
| Metric | Audio Preview | GPT-4o (Text-Only) | Delta |
|---|---|---|---|
| First Token Latency (1-shot) | 1.2 sย avg | 0.35 s | +0.85 s |
| MOS (Speech Naturalness, 5-pt) | 4.43 | โ | โ |
| Instruction Compliance (Voice) | 92 % | 73 % | +19 pp |
| Function Call Arg Accuracy | 95.8 % | 87 % | +8.8 pp |
| Word Error Rate (Implicit STT) | 5.2 % | n/a | โ |
| GPU Memory / Stream (A100-80GB) | 7.1 GB | 14 GB (fp16) | โ49 % |
Benchmarks executed via Chat Completions streaming, batch size = 1.
See Also GPT-4o Realtime API

