Neocortex Logo
You can wire the OpenAI Realtime API into Unity yourself. Here is everything that build involves, and when a game-ready platform like Neocortex saves you weeks.

Building Voice NPCs on the OpenAI Realtime API vs Using Neocortex

ComparisonAI NPCUnityLLMs

With speech-to-speech models like OpenAI's gpt-realtime, a talking NPC demo takes an afternoon. Shipping one takes much longer.

This post walks through what building voice NPCs directly on the OpenAI Realtime API involves in Unity, and where Neocortex fits.

What the Realtime API gives you

From OpenAI's docs (checked October 2026):

  • Speech-to-speech models with function calling, image input and a 128K context window.
  • Connections over WebRTC for browsers and mobile, or WebSocket from a trusted server.
  • Token-based pricing for audio and text input and output, with no fixed per-minute rate.
  • Sessions capped at 60 minutes.
  • No official Unity SDK. Only community ports exist.

What you build yourself

To ship a voiced NPC on the Realtime API, your team owns:

  1. A Unity audio client for capturing the microphone, streaming it and playing the reply, including WebGL.
  2. A backend that issues short-lived keys, because your API key can never ship in a game build.
  3. Character design as prompts, kept consistent across every update.
  4. Memory across sessions, and reconnecting before the 60-minute limit.
  5. Game integration, so function calls turn into actions in your scene.
  6. Guardrails, so characters stay in character and on brand.
  7. Cost control, since every second of audio is billed in tokens.
  8. Upkeep every time models, prices or APIs change.

None of it is impossible. All of it is time you are not spending on your game.

DIY on OpenAI vs Neocortex at a glance

DIY on OpenAI RealtimeNeocortex
Unity clientWrite your ownUnity SDK with voice samples
Backend for keysWrite your ownIncluded
Character designPrompts in codeVisual node editor
VoicePreset model voicesVoice cloning and voice design
Game actionsWire up function callsActions and interactable objects built in
EnginesWhatever you buildUnity, Unreal, Godot (beta), Web API
Model choiceOpenAI onlyManaged for you, plus local LLMs in Unity via Ollama
CostTokens per second of audioMonthly plans with included credits

Why teams choose Neocortex

The demo is the easy part; we handle the rest. Character consistency, voice streaming, session management, usage metering and SDK upkeep across engines are what Neocortex maintains, so you do not have to.

Designers stay in control. Personality, emotion, knowledge, intents and actions are nodes in a visual graph, not a prompt buried in code.

Not locked to one model provider. Prototype with open models running locally through Ollama in Unity, and ship through the cloud.

When DIY is the right call

If AI conversation is your core technology and you have engineers to build and maintain the stack, going direct gives you maximum control. If AI characters are a feature of your game rather than the product itself, Neocortex gets you there in hours instead of weeks.

OpenAI details were last checked in October 2026.

Written by

Sercan Altundas

Date

Oct 17, 2026

Read time

4 min