Before you start
You have an existing OpenAI Realtime API integration and want to point it at Dialog-RSN-1 instead. This API is wire-compatible with OpenAI’s Realtime protocol, so most of an existing client works unchanged. By default the server speaks the replies, in a Cartesia voice, so your audio playback code can stay too. This guide lists what to change and what to remove, and how to move to your own text-to-speech if you want to.What stays the same
- The JSON event shape and names:
session.update,conversation.item.create,response.create,response.output_text.delta,response.done, and the rest of the vocabulary your client already parses. - The add-then-respond turn shape: add an item to the conversation, then ask for a response to it, exactly as before.
- The function-calling shape:
response.function_call_arguments.delta/.done, answered with afunction_call_outputitem and a freshresponse.create. - Push-to-talk:
turn_detection: null, theninput_audio_buffer.commitandresponse.createfor each turn.
What to change
If you use the official
openai SDK, the first and third rows are the whole connection change: pass the new base_url and key to the client, and it builds the URL and sends the key as a bearer token, which this API accepts.
You don’t need to change your tools. When a tool looks like it will take a while, such as an API lookup, Dialog-RSN-1 says a short line to the caller as it calls it, like “let me check that for you”. It stays quiet on quick or behind-the-scenes tools. To control which tools speak, see Choosing when a tool speaks.
Full code on GitHub
A voice agent on the
openai SDK, before and after the move to text replies. diff before.py after.py is the whole migration.What to strip out
An OpenAI Realtime client usually carries settings this API has no use for, and a few of them return errors. Session settings this API rejects. Each of these returns anunsupported_parameter error naming the field:
reasoningandprompt.tool_choiceother than"auto", and any tool that isn’t afunction, MCP servers included.- In
turn_detection,idle_timeout_msand"interrupt_response": false. - An
audio.output.formattype other thanaudio/pcm.
output_modalities: ["text", "audio"] fails with invalid_request_error.
Response and item settings this API rejects. These also return unsupported_parameter or unsupported_item_type, and they’re common in OpenAI clients:
- In
response.create, anything exceptinstructions,max_output_tokensandmetadatathat differs from the session. That covers out-of-band responses (conversation: "none"), a per-responseoutput_modalities,toolsortool_choice, andinput. Change the session withsession.updateinstead. - Audio content (
input_audio) inconversation.item.create. Stream the caller’s audio withinput_audio_buffer.append.
session.update applies none of its fields, so one leftover setting also throws away the instructions and tools sent alongside it. If your client logs errors and carries on, it ends up running with no prompt and no tools, so remove the fields rather than silencing the error.
Session settings this API ignores. These are accepted and dropped, so session.updated shows only what’s in effect. Remove them anyway, since they do nothing here:
model,tracing,truncationandinclude.- The
turn_detectiontiming fieldsthreshold,prefix_padding_msandsilence_duration_ms, and"interrupt_response": true."type": "semantic_vad"leaves the session onserver_vad. audio.input.noise_reduction.- An OpenAI voice name such as
marininaudio.output.voice, andaudio.output.speed.
instructions and tools, this is all the session needs. Leave out output_modalities to keep the server’s voice:
what this service acts on
audio.input.transcription is accepted, and the transcript arrives as the usual conversation.item.input_audio_transcription.* events. Because it comes from the model’s turn, .completed arrives only when that response completes. A reply canceled by a barge-in or response.cancel, or one that fails, gets at most some .delta events and no .completed. With the managed voice, .completed lands once the spoken reply has finished playing.
If you only want the transcript, OpenAI’s transcription sessions work here too: connect with intent=transcription and send session.type: "transcription". Each turn is transcribed and never answered. Transcription sessions lists how they differ from OpenAI’s.
Dialog-RSN-1 decides when the caller has finished. It already waits through pauses and slow speech, and replies quickly once the caller is done. To make it more or less patient, describe your callers in instructions, in plain language, where you’d have tuned silence_duration_ms. Turn-taking has examples.
The audio playback path. An OpenAI Realtime client usually listens for response.output_audio.delta and feeds it to a jitter-buffered player. You choose who speaks the reply:
- The server’s voice, the default. Sessions start with
output_modalities: ["audio"], and the server speaks each reply itself. The audio arrives asresponse.output_audio.delta, PCM16 at 24 kHz, with the transcript inresponse.output_audio_transcript.*, so your playback code keeps working. To choose a voice, pass a Cartesia voice id inaudio.output.voice. - Your own text-to-speech. Set
output_modalities: ["text"], delete the playback code, and read the reply fromresponse.output_text.deltainstead. Noresponse.output_audio.*events arrive. This is what the companion repo’safter.pydoes. Using your own text-to-speech covers the rest, including the playback reports that tell the server what the caller heard.
Differences to check
With text replies,conversation.item.truncate is acknowledged but doesn’t shorten history. MCP server tools are rejected. The full list is in Differences from OpenAI Realtime.
Overview
What Dialog-RSN-1 does well, with links to each feature.
API reference
Every event, the session object, function calling, and error codes.
Python from scratch
Building a client against this API directly, without carrying over an existing OpenAI integration.

