What you can grade separately
You can grade each layer of the agent on its own:
The middle two layers are text and JSON. You can assert on a reply’s exact characters, with no transcription step in the way and no audio quality to confound the result. A regex can catch a bulleted list in a reply meant to be spoken.
Hold the voice fixed. It sits in the middle of the latency your caller feels and of barge-in behavior. Changing voice, provider, or buffering between runs moves numbers that have nothing to do with the model.
Events to record
Record every frame you send with a monotonic timestamp and every event you receive with another, and you have the evidence for every metric on this page.Audio and text sessions
Test with the same output modality you run in production.- Audio session, the default (
output_modalities: ["audio"]). The server speaks the reply. The reply text arrives asresponse.output_audio_transcript.deltaand.done, and the speech asresponse.output_audio.delta, sent at the pace it plays. The server tracks playback itself, so barge-in and history follow what the caller heard with nothing more to send. The firstresponse.output_audio.deltagives you time to first audio, andresponse.donearrives once the reply has finished playing. - Text session (
output_modalities: ["text"]), for your own text-to-speech. The reply arrives asresponse.output_text.deltaand.done, andresponse.donearrives when the text is complete. Time to first audio depends on your text-to-speech, so measure it in your harness. Send playback reports as your production client does.
response.output_audio_transcript.* in place of response.output_text.*.
speech_stopped marks a turn Dialog-RSN-1 judged finished. A caller pausing mid-sentence produces no stop at all. speech_started arrives as soon as the caller starts talking, or, while a reply is playing, once Dialog-RSN-1 has judged the sound to be the caller. A sound that turns out not to be the caller gets no speech_stopped after it. So you can check turn segmentation directly: count speech_stopped and committed pairs, compare against the turns your fixture contains, and treat a lone speech_started as a sound the model ignored. The API reference has the full sequence.
The transcript arrives with the reply. conversation.item.input_audio_transcription.completed comes during the reply, usually after its first text, and only with a reply that completes. A reply canceled by a barge-in, or one that fails, usually leaves its turn with no transcript at all. A collector that waits for the transcript before recording the reply will hang on exactly those turns. Record both, and join them by item id afterwards.
Playback reports
On a text session, your client tells the server what the caller heard withpoly.output_audio.started, .delta and .stopped. These reports decide how long Dialog-RSN-1 checks a sound during a reply before treating it as an interruption, and what history keeps after a barge-in. Using your own text-to-speech explains them in full. On an audio session the server tracks playback itself.
Without reports, history holds the server’s estimate of what was heard. With them, it holds your spoken_text, which makes your record of what was played the ground truth to grade against.
Metrics
Grouped by which failure they catch. All of them come from the event log plus your own fixtures, and none needs an LLM judge except where noted.Task and correctness
Turn-taking
Latency
Define a start and an end event for every timer, and never mix populations.Transcription and text quality
Cost
You pay for connected time, from when the WebSocket opens to when it closes. Track it per scenario, and keep it separate from your own text-to-speech, judge, and simulated-caller costs. If you fold those into the agent’s cost, a prompt change can look like a cost regression.Run every scenario more than once. Generation isn’t deterministic, and neither is a turn-taking decision made on live audio. Report P50 and P90 for every latency and duration metric alongside the completion rate and the sample count. A single run tells you almost nothing about the tail.
Three test stages
Build three harnesses, each adding one variable. Every stage keeps the scenarios, expected outcomes and graders, and changes only the caller input and how much interaction there is.Synthesized single turns
Write the caller’s request as text, synthesize it once, and reuse that WAV forever. The audio is now a fixture: identical bytes, identical pacing, every run. What changes between runs is your prompt, your tools, or your application, which is what you want when you’re chasing a regression. For each scenario the harness:- Loads the written request, the context and tools the agent gets, and the expected outcome, which the agent never sees.
- Streams the synthesized audio in paced PCM frames, at roughly the rate a real caller’s audio would arrive.
- Lets the agent answer, ask, refuse, or call a tool, running the tool against a fixture application.
- Records the event timeline, the reply text, the tool calls, and the final application state.
- Grades all of it against the expected outcome and saves the artifacts.
input_audio_buffer.append, the turn boundary you measure afterwards describes your harness instead of the model.
You don’t have to start from an empty conversation. To test a specific point mid-call, seed the earlier turns as text with conversation.item.create and stream only the turn under test as audio. That gives you real conversational context without the variance of replaying an entire call.
seeding history, then testing one turn
Recorded audio
This stage keeps everything constant except the recording. Use recordings of real callers, cleared for use, wherever you can, because they carry the voices, accents, microphones and rooms your agent will meet. Where you can’t collect them, apply controlled effects to clean recordings, and seed the effects so every run is reproducible. Cover the conditions that reach a phone line: background noise across a range of signal-to-noise ratios, telephony band-limiting and codec artifacts, room reverberation, packet loss with concealment, and speakerphone echo where the caller’s channel carries your own reply back. Test echo first. Dialog-RSN-1 checks that sound arriving during a reply is really the caller before treating it as a barge-in, and a speakerphone scenario, where your reply bleeds back into the caller’s microphone, is the direct test of that check.
Test clarification, recovery and anything else that needs a second turn with simulated calls.
Simulated calls
This stage connects your agent to an independent simulated caller and lets both sides talk until the task is done or clearly failed. Multi-turn memory, mid-conversation corrections, barge-in, and recovery from an unavailable option are only observable here. Play the reply to the caller on a real clock. A caller listening to a reply can interrupt it, backchannel, or grow impatient, and all of that happens while the reply is playing. Feed the reply to the simulated caller as text and you’ll never reproduce any of it. On an audio session, play eachresponse.output_audio.delta into the caller’s input as it arrives, since the server sends it at the pace it plays. On a text session, synthesize the reply and play it on the conversation’s own timeline, so the reply takes as long to hear as it really would.
On a text session, this stage is also where you measure what playback reports change. Grade two things:
- Whether a sound during playback gets checked before it interrupts. Without reports, that check follows the server’s speaking-rate estimate rather than your voice, and how often the two differ depends on your voice’s pace and your reply lengths.
- What the caller heard. Grade the confirmation the caller actually got against
spoken_text, and keep the full reply text for grading the model.
- Loads the caller’s goal, persona, and opening line, plus the agent’s own context and the expected outcome it never sees.
- Runs both sides on one advancing timeline: caller audio into the socket, the reply out, reply audio back into the caller, and, on a text session, playback reports back into the socket as that audio plays.
- Lets the agent answer, clarify, refuse, or call tools while the caller reacts.
- Detects that the conversation has resolved, then drains remaining playback and any in-flight tool work.
- Grades the conversation, the tool calls, and the final application state, and saves the recording, the transcript, and the event log.
Give the cut-off row its own scenario if your agent collects digits at all. The turn-taking recipes show how to tell the agent to wait for a complete number, and the event log makes the result unambiguous: two
committed events for one spoken number means the caller was cut off.
Collecting the evidence
One collector serves all three stages. Put both directions of traffic on a single monotonic timeline.timeline collector
reporting playback
input_audio_buffer.append with the timestamp you sent it and the number of samples it carried. Without it you can’t compute turn confirmation time, and you can’t tell a slow model from a harness that stalled for 400 milliseconds between frames.
Keep, per run: the scenario id and version, the session configuration, the exact audio sent, the full event log in both directions, the reply text, the scope verdict, the tool calls and their results, the application state before and after, the audio the caller heard, and the grader’s input and verdict.
Diagnosing a failure
Trace the request forwards and stop at the first step that went wrong. Each step has a different fix.- The audio never arrived as intended. Frames sent too fast, at the wrong rate, or with a gap your harness introduced. Fix the sender, and invalidate the run rather than scoring it.
- The transcript is wrong. An audio or acoustic problem, or a name the agent’s instructions don’t mention. Reproduce it in the recorded-audio stage with the same recording. Names and terms in your instructions help Dialog-RSN-1 hear them, as speech understanding explains.
- The transcript is right and the tool arguments are wrong. A prompt or tool-description problem. Reproduce it as a single turn with the transcript seeded as text, which removes audio from the picture entirely.
- The tool ran and the state is wrong. Your application. The event log will show the correct call.
- Everything is right and the reply is wrong. Your instructions, or the knowledge you passed. Assert on the reply text directly.
- A tool spoke when it shouldn’t have, or didn’t when it should. Your tool settings. Set
"poly_speech": "required", or a requiredpoly_spokenargument, on tools that should always say a line, and"poly_speech": "none"on tools that shouldn’t. See Choosing when a tool speaks. - Everything is right and the caller heard it late. On a text session, your text-to-speech, your buffering, or your playback loop. Compare time to first audio against time to first token to see whether the delay is before or after the first token.
Next steps
API reference
Every event your collector can record.
Prompting
The
instructions text behind the behaviors these scenarios test.Using your own text-to-speech
Streaming replies to your voice, barge-in, and playback reports.
Python from scratch
A working audio client to build a harness on top of.

