Text-to-Speech & Realtime Voice — Speech & Audio APIs
Text-to-Speech & Realtime Voice
Generating Speech
The gpt-4o-mini-tts model generates natural-sounding speech with unprecedented control over tone, emotion, and delivery style.
const audio = await openai.audio.speech.create({
model: "gpt-4o-mini-tts",
voice: "coral",
input: "Welcome to the Infinity Tech Stack Academy!",
instructions: "Speak with enthusiasm and energy, like a tech conference host.",
response_format: "mp3"
});
Steerable TTS
Unlike traditional TTS that just reads text flatly, gpt-4o-mini-tts accepts instructions that control HOW it speaks - tone, pacing, emotion, accent emphasis.
Available Voices
| Voice | Character |
|---|---|
| alloy | Neutral, balanced |
| echo | Warm, conversational |
| fable | Expressive, storytelling |
| onyx | Deep, authoritative |
| nova | Friendly, upbeat |
| shimmer | Soft, calm |
| coral | Clear, professional |
The Realtime API (May 2026)
For ultra-low latency voice applications, the Realtime API supports two transport protocols: WebSocket for server-to-server and Node.js clients, and WebRTC as the recommended transport for browser and mobile clients (lower latency, NAT traversal, built-in echo cancellation). New models launched in May 2026:
| Model | Capability |
|---|---|
| gpt-realtime-2 | GPT-4o-class reasoning for live voice interactions |
| gpt-realtime-translate | Real-time multilingual speech translation |
| gpt-realtime-whisper | Live streaming speech-to-text transcription |
Latest Realtime & Full-Duplex Models (September–October 2026)
| Model | Capability |
|---|---|
| GPT-Live-1 | Full-duplex conversational voice ($0.05/min, launched Sept 10, 2026) that listens & speaks simultaneously while delegating deep reasoning to GPT-6 Astra |
| gpt-realtime-2.1 | Newest realtime reasoning model with tool use over WebRTC & WebSocket |
| gpt-realtime-2.1-mini | Cost-efficient version of gpt-realtime-2.1 with tool use (also scheduled to succeed legacy tts-1 / gpt-4o-mini-tts after Jan 6, 2027) |
The original gpt-realtime-mini is now listed as Deprecated in the official catalog (and legacy gpt-4o-realtime / gpt-realtime v1 snapshots sunset January 20, 2027) - start new Realtime projects on GPT-Live-1, gpt-realtime-2.1, or gpt-realtime-2.1-mini.
- Voice Activity Detection (VAD): Automatically detects when users stop speaking
- Tool Calling in Voice: Trigger backend tools while speaking
- Audio Reasoning: Understands tone, inflection, and urgency
Generate realistic natural speech from text. Call /v1/audio/speech with the tts-1 model and the nova voice.