pinecallDocs
Guides / Spoken tests

Spoken tests

Goldens and personas said out loud, with background noise and packet loss.

A written test proves the agent decides right. A spoken test proves it still decides right when every word goes through a voice, a phone-quality line and speech recognition. Add background noise and lost packets, and you test the line your callers actually have.

How it works#

--voice puts a real call on a real line. A Pinecall worker opens a room, dispatches the agent into it, and a simulated caller speaks each line out loud. The agent hears it through its own speech-to-text, answers with its own voice, and the same judges read the log the call leaves.

Command What is said out loud
pinecall test --voice each golden's say turns, line by line
pinecall simulate --voice a persona's improvised turns

The caller speaks the agent's language in a voice the agent does not have, so the two sides are told apart by ear. A persona that names its own --tts and --voice is read in those instead.

Goldens, out loud#

Terminal
pinecall test --voice --grep reserva

The same goldens and the same matrix. Each say turn is said in turn, and the golden is judged on its final expect once the call is sealed. A spoken run plays the golden files alone: the approved cases are a real caller's words and are played as written calls, so --voice asks for none and --voice beside --dataset or --case is refused.

Two things a written run allows are refused out loud, because the worker builds the spoken session itself:

Refused with --voice Why
--model the worker runs the model the agent declares; compare models in writing
a golden with today a spoken call runs on the real day; run that golden without --voice
a golden with an event turn or a then a spoken line is not LiveKit's test run, so there is nothing to check a step on; run it without --voice

A broken spoken golden is still written to .pinecall/evals/<run>/, but its asked says the requests were not recorded: they were built in the worker. The log in the same file is the whole record.

Personas, out loud#

Terminal
pinecall simulate --persona in-a-hurry --voice --judge
pinecall simulate --persona in-a-hurry --listen

--listen puts the call on this machine's speakers while it happens, both sides mixed, through ffplay, play, aplay or pw-play, whichever you have. It turns --voice on and says so.

Terminal
$ pinecall simulate --persona in-a-hurry --listen --turns 2
--listen is a call with audio in it: --voice is on
in-a-hurry · I called to get the main thing this business does for its callers done, quickly. I answer only what I am asked and lose patience after two questions in a row.

The caller waits for the agent's greeting before its first line, as a person does. On a spoken call the caller's turns printed are what the agent's speech-to-text heard, not what the caller meant to say.

A spoiled line#

Flag pinecall test --voice pinecall simulate --voice
--background-noise <dB> a television behind the caller, that many dB under their voice the persona's own ambience, a television for one that names none
--ambience <what> which plays at that level: television, cafe, office or street; nothing plays without --background-noise which plays, for this call
--packet-loss <share> a share from 0 to 1: 0.05 drops 5% the same
Terminal
pinecall test --voice --background-noise 12 --packet-loss 0.05
pinecall simulate --persona in-a-hurry --voice --background-noise 12 --packet-loss 0.05

--packet-loss 5 is refused by both verbs: it is a share, at most 1. In simulate, setting only --packet-loss or --ambience also puts the noise behind the caller at 15 dB.

All three are about audio, so both verbs refuse them without --voice (exit 2) rather than run a written call that ignores them.

The television these flags play is a real newscast heard across a real living room.

A bad network#

simulate --voice can put the caller on a network of your choosing. The four flags are done to the call's real packets, in both directions, on their way between the caller and the room:

Flag What the network does
--packet-loss <share> loses that share of the packets at random, from 0 to 1
--delay <ms> holds every packet that long, 0 to 2000; the caller also hears each answer that late
--jitter <ms> moves each packet's delay up to that far either way, 0 to 500
--rate <kbps> carries that many kilobits a second and drops what would wait more than 300 ms; a voice needs about 64
Terminal
pinecall simulate --persona in-a-hurry --voice --packet-loss 0.05 --delay 150 --jitter 40

A lost packet is one the room never received, so the call conceals it or asks for it again, as it would on a mobile network. The summary line names the network the call was placed on: 5% packet loss, 150 ms delay ± 40 ms.

By phone#

By default the simulated caller sits in the agent's room, as a browser does. --via sip has it ring the agent as a phone does instead:

Terminal
pinecall simulate --persona in-a-hurry --voice --via sip --judge

The caller's audio reaches the agent through a SIP leg in a carrier's codec (G.711 at 8 kHz), the call's channel is phone, and hanging up is a phone's hang-up. The agent answers at the number it has in the sandbox, or at the deployment's test line when it has none. No carrier is involved and no carrier minutes are billed. It runs in the sandbox, and it combines with the network flags above.

--via, --delay, --jitter and --rate are about a spoken call: they are refused without --voice (exit 2).

Several models, side by side#

The same caller, the agent under each configuration, every call placed at once and read as one table:

Terminal
pinecall simulate --persona in-a-hurry --voice --judge \
  --against llm=groq/openai/gpt-oss-120b \
  --against llm=google/gemini-3.5-flash-lite \
  --against llm=anthropic/claude-haiku-5-5,tts=deepgram

--against takes the test room's knobs — stt=, llm=, tts=, voice=, language=, temperature=, joined by commas — for the agent on that call alone; its saved settings do not change. The table reads best first: every judge held, then the most held, then the fastest reply, then the cheapest, one row per configuration with its judges, its medians (the reply, the model's first token, the voice's first byte, the hearing), its cost, its length and its call, which pinecall sessions <call> reads whole. In the sandbox only, with a key that edits the pipeline; an org has ten simulations on the line at once, so ten configurations at most. The console's Simulations ▸ Compare models, in the sandbox, runs the same and opens each row's call; tick several callers there and each runs against every configuration, one call per pair, ten at most. The MCP's simulate takes against the same way.

What it costs#

A spoken test is a real call: the agent's speech-to-text, model and voice, and the caller's model and voice, all billed like any call. Each spoken call — every golden of pinecall test --voice, every spoken simulate — is one of your org's simulations, checked before it starts. A spoken simulate takes 40 caller turns at most. Run spoken tests on the goldens that matter for audio (names, numbers, dates said aloud) rather than the whole suite on every push.

In the console, an agent's Evaluate ▸ Simulations runs the same spoken simulation and lets you hear it live in the browser. Its Noisy line settings start at 15 dB and 0% loss.

Next steps#