Skip to main content
Build a voice agent using OpenAI’s GPT-4o Realtime API for native speech-to-speech processing. OpenAI Realtime processes audio directly without intermediate text conversion, delivering the lowest latency voice conversations. Best for: Applications requiring minimal latency and native multimodal AI capabilities.

How Speech-to-Speech Differs

Standard Pipeline (STT → LLM → TTS):
Speech-to-Speech (Direct):
Speech-to-speech models process audio natively, preserving tone, emotion, and context that may be lost in text transcription.

Prerequisites


Installation


Environment Variables


Pipeline Configuration


OpenAI Realtime Features

Available Voices


Architecture

With OpenAI Realtime, the pipeline is simplified:
A single service handles:
  • Speech recognition
  • Language understanding
  • Response generation
  • Voice synthesis

Quick Start

Inbound Calls

Configure your Plivo number’s Answer URL to your ngrok URL.

Outbound Calls


When to Use OpenAI Realtime

Choose OpenAI Realtime when:
  • Latency is your top priority
  • You want the simplest integration
  • Built-in voices meet your needs
  • You’re already using OpenAI
Choose standard STT → LLM → TTS when:
  • You need specific voice characteristics (ElevenLabs cloning, Cartesia emotion)
  • You want to mix providers for cost optimization
  • You need fine-grained control over each component