Test your transcriber with recording replay
Simulations support two kinds of scenario. In a conversation scenario, an AI tester talks to your assistant. In a recording replay scenario, one of your call recordings is played to the assistant in place of an AI tester, and Vapi scores what the assistant’s transcriber heard against an answer key you provide.
Use a recording replay to compare transcribers or transcriber settings on your own audio, and to check the values your workflow depends on, such as names, dates of birth, medication doses, and phone numbers. This page explains how a replay works, how to write an answer key, and how to read the results.
You create recording replay scenarios through the API. Replays run, and show their results, in the Dashboard like any other simulation.
Tools and handoffs during a replay
A replay is a voice call to your assistant. The assistant hears the recording as a caller and its model answers, but no tool it calls runs. Every tool call returns a fixed result instead, so a booking tool makes no booking and an API request tool doesn’t call your server. This includes end-call and transfer tools, so the assistant can’t hang up or transfer the call before the recording finishes. The assistant also doesn’t speak a tool’s messages, such as the end-call tool’s goodbye, so they can’t talk over the recording.
If the scenario has tool mocks, a mock still returns its result for the tool it names, as in voice simulations.
The rest of the assistant runs as it does in a voice simulation. Its own hooks still run, but a tool a hook calls returns the fixed result too. Its server URL receives server messages under the same rules as any simulation: lifecycle messages, such as the end-of-call report, are suppressed. See Mock tool responses for which requests can still reach your server.
An assistant with a handoff tool is refused before any audio plays, because a handoff would mix two transcribers into one score. Replay against an assistant without handoff tools.
How it works
A recording replay scenario is a scenario with a recording and an answer key. When a run starts:
- Vapi downloads the recording and the answer key, and decodes the recording to 16 kHz mono audio. A file that can’t be downloaded or decoded fails the run item before any call is placed.
- Vapi places one voice call to the assistant under test and streams the recording into it at normal speed, followed by 10 seconds of silence so the transcriber finishes the last utterance.
- Vapi collects the transcriber’s final transcripts of the caller and scores them against the answer key.
There is no AI tester and no AI judge. The score is calculated by fixed rules, so the same transcript always gets the same score.
The assistant runs with its own configuration, so the result reflects the transcriber model, language, keyterms, and endpointing you actually use. For the replay call, Vapi changes only what a replay needs:
- The assistant waits for the caller instead of speaking first.
- Interruptions are on, so the recording is never muted while the assistant speaks.
- The silence timeout and maximum duration are set to your organization’s simulation time limit, so the assistant doesn’t hang up during a pause in the recording.
- The call records no audio.
- Tool calls return a fixed result instead of running. See Tools and handoffs during a replay.
The assistant may reply to what it hears. Its replies aren’t scored.
The recording reaches the assistant over a WebSocket call, not a phone line. A recording of a phone call keeps the phone line’s audio quality, but a recording made at higher quality isn’t reduced to phone quality, so it can score better than the same caller would on a phone call.
A transcriber that uses the assistant’s speech as context, such as Soniox stt-rt-v6 with agent text input, receives the assistant’s replies to the recording, not what the agent said on the original call.
What you get
Compare transcribers
Keep the recordings and answer keys fixed and change only the transcriber. Create one assistant per transcriber configuration, then run the same suite of replay simulations against each assistant. The run with lower WER and more exact key values heard your callers better.
The same recording usually scores the same on every run, so one iteration per assistant is enough. Add more recordings rather than more iterations.
Write an answer key
An answer key has two parts:
transcript: the verbatim words of everything in the recording, up to 30,000 words.keyValues(optional): up to 20 values that must come through, each up to 100 characters, with up to 10acceptedVariants.
Transcribe everything in the recording
Vapi mixes the recording down to one channel, so a recording of both parties is transcribed as one speaker. The answer key must contain both parties’ words, in order. If your recordings have the caller and the agent on separate channels, split them and replay the caller’s channel on its own, with only the caller’s words in the answer key.
How words are compared
Vapi normalizes the answer key and the transcript the same way before comparing them, so a word only counts as an error when it differs after both are normalized:
- Case and punctuation are ignored.
- Hesitations (
uh,um,ah,hm,hmm,mhm,mmm,uhh,umm) and backchannels (uh-huh,mm-hmm,uh-oh) are dropped. A hesitation next to a number is kept, because it may be part of a code such asgate uh 7.mmanderare always kept, because in medical calls they mean millimeters and the emergency room. okayandokare the same word, as arealrightandall right.- Ordinal suffixes are dropped:
3rdis3. - Letters and digits written together are split:
5mgis5 mg. - Thousands separators are dropped:
1,000is1000. A decimal comma is a decimal point:2,5is2.5. - A numeric date with a four-digit year is the same with slashes, dots, or dashes:
3-14-1985is3/14/1985. - Symbols that change a spoken value are read aloud: an email or domain (
@isat,.isdot), a decimal point (2.5is2 point 5), a minus sign, a percent sign, and a slash between numbers.
These differences are not normalized, so they count as errors:
- Number words and digits:
twenty fiveis not25, andtwo point fiveis not2.5. - Units:
mgis notmilligrams. - Date formats:
March 14, 1985is not3/14/1985. - Leading zeros:
03/14/1985is not3/14/1985.
Write the answer key the way your transcriber writes, or add the other forms as accepted variants on the key values that matter. WER for languages written without spaces between words, such as Chinese, Japanese, and Thai, isn’t meaningful.
How key values are matched
A key value is exact when its words appear in the transcript in the same order, after normalization, or when any accepted variant does. The value can appear anywhere in the transcript.
- A value spelled out letter by letter counts:
M A R I AmatchesMaria. - A possessive counts:
Maria'smatchesMaria. - Digits match whatever their grouping:
415 555 0142,(415) 555-0142,(415)-555-0142, and4155550142all match415-555-0142. A hesitation inside the number doesn’t break it:415 um 555 0142matches too. - A match must be the whole value.
XJ4821doesn’t match insideXJ4821BorXJ-4821-B,84721doesn’t match inside847219,5 mgdoesn’t match0.5 mg, andmaria@x.comdoesn’t match insidemaria@x.com.au. - A leading
www.on a domain is optional.
A key value is near when a close spelling of it appears across whole words: at most about one wrong letter in five (Rayner for Raynor), or the same letters split differently (hub spot for HubSpot). A value that contains a digit is never near, because a changed digit is a different number. A value shorter than five letters is near only when its letters are split or joined differently: Ann a is near for Anna, but Ana is missed.
Anything else is missed.
Write number values with their unit, such as 25 mg rather than 25. A bare number doesn’t match a number written onto a unit (25mg), and a value with its unit is less likely to match an unrelated number elsewhere in the call.
Required key values
Set required: true on a key value to fail the run item unless it comes through exact. A required value that comes through near fails. The required field defaults to false: the verdict is reported but doesn’t decide the result.
If a close spelling is acceptable for a required value, list it in acceptedVariants. For example, list Gonzales for Gonzalez if either spelling is fine for your workflow.
Set a WER threshold
A recording replay scenario’s evaluations take a built-in metric instead of a structured output:
valueis a fraction from0to1, where0.1is 10%.comparatoris<,<=,>, or>=.requireddefaults totrue. Set it tofalseto report the result without failing the run item.
A recording replay scenario takes only metric evaluations, and it may have none. A conversation scenario can’t use metric.
A run item passes when every required evaluation holds and every required key value comes through exact. A replay with no evaluations and no required key values passes whenever it finishes and is scored.
Create and run a replay
Host the recording and answer key
Put the recording where Vapi can download it over HTTPS, such as a presigned URL from your storage bucket. Vapi downloads it each time a run starts and doesn’t store the file. Use a URL that stays valid until the run executes.
Supported formats are WAV, MP3, FLAC, and OGG. MP4 and M4A work only when the file is written for streaming, with its index at the start. Headerless raw PCM isn’t supported. On the default 10-minute simulation time limit, a recording can be about 8 minutes long. See Limits.
You can include the answer key in the scenario as answerKey, or host it as a JSON file with the same shape and pass answerKeyUrl. Supply one or the other, not both.
Create a recording replay scenario
A scenario becomes a recording replay when it has a transcriptReplay object, which holds the recording URL and the answer key:
The instructions field is optional, because there is no AI tester. A recording replay scenario can’t have hooks (run webhooks) or latencyExpectations.
The response returns the scenario, including its id.
Create a simulation
A simulation pairs a scenario with a personality. A replay doesn’t use the personality, but the API requires one, so pass the id of any personality, such as a built-in (Default) personality from GET /eval/simulation/personality.
To run many recordings together, create one scenario and simulation per recording and group the simulations in a suite.
Run it against an assistant
A replay runs only in voice mode (vapi.websocket) and only against a single assistant. It can’t target a squad or a GPT-Live assistant, and it can’t be an inline scenario in the run request: save the scenario first, then run it by simulationId or scenarioId.
In the Dashboard, run or rerun a suite that contains replays the same way as any suite: choose Voice and an assistant. A chat run or a squad target is refused.
To compare transcribers, run the same suite once per assistant.
Read the results
Read a replay’s results the same way as any simulation run. Fetch the run with GET /eval/simulation/run/<run-id>; when its status is ended, fetch its items:
Or open the run in the Dashboard. See Read the results.
Read the results
A replay’s score is in each run item’s results.transcriptEvaluation. Its results.evaluations array is empty, because a replay has no structured-output evaluations. The transcriber’s transcript is in metadata.call.transcript.
In this example, WER is within the threshold, but the item fails because the required surname came through near.
In the Dashboard, open the run and select the item. A replay shows the word error rate with its edit counts, each WER threshold, each key value’s verdict, and the reason a failed item failed, such as “Key value 1 came through near; it is required to be exact.” The transcript column shows what the transcriber heard. A replay has no recording to play back.
HIPAA, PCI, and zero data retention
When HIPAA, PCI, or zero data retention is enabled for the organization, the assistant under test, or the scenario’s targetOverrides, a replay stores no transcript text and no answer-key text:
- You must use
answerKeyUrl. An inlineanswerKeyis rejected when you save the scenario on such an organization, and when you run a stored inline key against such an assistant. - The run item keeps the scores, verdicts, and whether each key value was required, by position only.
keyValues[].valueis left out andmetadata.call.transcriptis empty. - The Dashboard names key values by number and shows that the transcript isn’t stored.
Vapi doesn’t store the recording or the answer key file, and the replay call records no audio. Vapi does store the recordingUrl and answerKeyUrl you provide, on the scenario and on each run item. A presigned URL gives access to the file until it expires, so set the shortest expiry that still covers your run.
An assistant with transcripts turned off (artifactPlan.transcriptPlan.enabled: false) also stores no transcript. Its scores and key-value text are kept.
Limits
A replay plays the recording at normal speed, so each run item takes about as long as the recording plus 10 seconds of trailing silence and the time to connect.
Cost
A replay places one call, to the assistant under test, and it’s billed like any other call to that assistant. There is no AI tester call, and scoring uses no model.