Skip to main content
Building with a coding agent? The coding agent version of this guide gives you the prompts, what to check, and what to tell your agent when it goes wrong.

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 a function_call_output item and a fresh response.create.
  • Push-to-talk: turn_detection: null, then input_audio_buffer.commit and response.create for 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 an unsupported_parameter error naming the field:
  • reasoning and prompt.
  • tool_choice other than "auto", and any tool that isn’t a function, MCP servers included.
  • In turn_detection, idle_timeout_ms and "interrupt_response": false.
  • An audio.output.format type other than audio/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 except instructions, max_output_tokens and metadata that differs from the session. That covers out-of-band responses (conversation: "none"), a per-response output_modalities, tools or tool_choice, and input. Change the session with session.update instead.
  • Audio content (input_audio) in conversation.item.create. Stream the caller’s audio with input_audio_buffer.append.
A rejected 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, truncation and include.
  • The turn_detection timing fields threshold, prefix_padding_ms and silence_duration_ms, and "interrupt_response": true. "type": "semantic_vad" leaves the session on server_vad.
  • audio.input.noise_reduction.
  • An OpenAI voice name such as marin in audio.output.voice, and audio.output.speed.
Apart from your instructions and tools, this is all the session needs. Leave out output_modalities to keep the server’s voice:
what this service acts on
Dialog-RSN-1 transcribes the caller as part of its own turn, so you don’t pick a transcription model. 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 as response.output_audio.delta, PCM16 at 24 kHz, with the transcript in response.output_audio_transcript.*, so your playback code keeps working. To choose a voice, pass a Cartesia voice id in audio.output.voice.
  • Your own text-to-speech. Set output_modalities: ["text"], delete the playback code, and read the reply from response.output_text.delta instead. No response.output_audio.* events arrive. This is what the companion repo’s after.py does. Using your own text-to-speech covers the rest, including the playback reports that tell the server what the caller heard.
Echo. If your client mutes the microphone while the assistant speaks, so it doesn’t hear itself through the speakers, the caller can’t interrupt it either. Dialog-RSN-1 checks that sound during a reply is the caller before it stops the reply. So with echo cancellation on, in the browser or on the phone line, you can drop the mute and let callers barge in.

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.
Last modified on November 24, 2026