OpenAI Voice via API
# support
p
Hello guys, Please clarify, is it possible to connect OpenAI Voice via API to our Assistant ? We need to resolve this issue, whether it is possible, since we haven't quite figured it out yet.
@User
@User @User
j
Yes, it’s possible to integrate OpenAI Voice with your Assistant via API, but the setup can be tricky depending on your assistant’s current architecture. I can guide you through the exact configuration to get it running smoothly and avoid common pitfalls. Can you share whether you’re looking for real-time streaming or pre-recorded responses? @Phill
p
In real time @Jarrah
j
Got it, real-time makes sense. Streaming OpenAI Voice in real-time can be tricky but fully doable, and the key is handling latency and audio chunking properly so the conversation feels natural. I can assist you on the exact setup that works reliably in production. If you want, we can continue this privately and I can map out the full solution for your assistant. @Phill
p
Yes, please. Please write to me.
j
Done ✅
c
Yes, it is absolutely possible to connect OpenAI Voice to your Vapi Assistant! There are two approaches depending on your needs: Option 1: OpenAI as a Voice/TTS Provider You can configure OpenAI as your text-to-speech (TTS) provider in your assistant's voice settings:
Copy code
{
  "voice": {
    "provider": "openai",
    "voiceId": "alloy"  // Available voices: alloy, echo, shimmer
  }
}
How to set this up in the Dashboard: 1. Navigate to Assistants in your Vapi Dashboard 2. Select your assistant or create a new one 3. In the Voice section, choose
OpenAI
as the provider 4. Select your preferred voice (alloy, echo, shimmer) 5. Click Publish to save Option 2: OpenAI Realtime API (Speech-to-Speech) For ultra-low latency conversations, Vapi supports OpenAI's Realtime API, which processes audio input and output natively (speech-to-speech) without the traditional STT → LLM → TTS pipeline:
Copy code
{
  "model": {
    "provider": "openai",
    "model": "gpt-realtime-2025-08-28",
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful assistant."
      }
    ]
  },
  "voice": {
    "provider": "openai",
    "voiceId": "alloy"  // Supported: alloy, echo, shimmer, marin, cedar
  }
}
Available Realtime Models:
gpt-realtime-2025-08-28
(Production-ready) •
gpt-4o-realtime-preview-2024-12-17
(Preview) •
gpt-4o-mini-realtime-preview-2024-12-17
(Preview, cost-optimized) Note: The realtime models have some limitations - Knowledge Bases are not currently supported, and certain voices (ash, ballad, coral, fable, onyx, nova) are not compatible. Documentation References: • OpenAI Voice Provider: [https://docs.vapi.ai/providers/voice/openai](https://docs.vapi.ai/providers/voice/openai) • OpenAI Realtime Integration: [https://docs.vapi.ai/openai-realtime](https://docs.vapi.ai/openai-realtime) Let me know if you need help configuring either option!