> ## Documentation Index
> Fetch the complete documentation index at: https://docs.verial.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Voice

> Simulated phone / IVR lines with recorded call transcripts.

The voice simulator stands in for a healthcare phone line: member services, provider intake, scheduling lines, or an IVR front door. Verial leases a real phone number for each sandbox so your agent can place an outbound call (or receive an inbound call) exactly as it would in production. Every call is recorded and transcribed; the verification engine scores `voice-transcript` criteria against the transcript.

## How your agent connects

When the benchmark run is created, the voice sandbox's `credentials` payload includes a leased phone number your agent can dial. The call connects to a simulated IVR flow configured on the simulator, optionally backed by a patient persona or human-facing agent. Your agent drives the conversation; Verial captures the audio and produces a turn-by-turn transcript with speaker labels.

Voice sandboxes route calls through a hosted IVR runtime. There is no `/v1/benchmark-runs/{id}/voice/*` HTTP surface during the rollout. The rollout happens over telephony. The resulting transcript is available through the benchmark run's interaction evidence.

## Connection model

| Artifact          | Where to find it                                                                                   |
| ----------------- | -------------------------------------------------------------------------------------------------- |
| Phone number      | `credentials.phone_number` on the voice sandbox (in the benchmark-run response's `sandboxes` list) |
| Expected IVR flow | Simulator `config.ivr`                                                                             |
| Transcript        | Interaction evidence; exposed through `criterion.evidence` after the rollout                       |

## Driving the rollout

1. Read the phone number out of the benchmark-run response.
2. Place the call from your agent (Twilio, Retell, or any telephony runtime).
3. Navigate the IVR, interact with the persona, and end the call.
4. Complete the task run; the verification engine fetches the transcript and scores `voice-transcript` criteria.

```bash theme={null}
curl "https://api.verial.ai/v1/benchmark-runs/$BENCHMARK_RUN_ID" \
  -H "Authorization: Bearer $RUN_TOKEN"
```

Inspect the `sandboxes` array for the voice sandbox and its leased `phone_number` in `credentials`.

## Configuration

At create time you configure the IVR flow, the persona the caller speaks to, and optional scripted beats the persona should hit.

```bash theme={null}
curl -X POST https://api.verial.ai/simulators \
  -H "Authorization: Bearer $VERIAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d @- <<'JSON'
{
  "type": "Voice",
  "name": "Member Services Line",
  "config": {
    "ivr": {
      "greeting": "Thank you for calling BlueCross. Press 1 for member services.",
      "menus": [
        { "key": "1", "label": "Member services", "route": "member_services" },
        { "key": "2", "label": "Provider services", "route": "provider_services" }
      ]
    },
    "persona": {
      "role": "member_services_rep",
      "tone": "professional, patient"
    }
  }
}
JSON
```

## Verification

The `voice-transcript` check inspects the call transcript for required and forbidden phrases. Phrase matching is LLM-assisted so the check is robust to paraphrasing.

```json theme={null}
{
  "label": "Agent collected member ID and DOB",
  "weight": 0.5,
  "axis": "correctness",
  "assertion": {
    "assert": "voice-transcript",
    "speaker": "agent",
    "contains": ["member ID", "date of birth"],
    "not_contains": ["social security number"]
  }
}
```

See the [Criteria concept page](/guides/concepts/criteria#voice-required-disclosures) for more examples and the full assertion spec.

## Next Steps

<CardGroup cols={2}>
  <Card title="Criteria" icon="check-double" href="/guides/concepts/criteria">
    Full reference for `voice-transcript` assertions.
  </Card>

  <Card title="Interactions" icon="clipboard-list" href="/guides/concepts/interactions">
    How transcripts and other evidence are recorded and retrieved.
  </Card>

  <Card title="Simulators overview" icon="server" href="/guides/simulators/overview">
    Lifecycle, provisioning, and configuration patterns.
  </Card>

  <Card title="Messages" icon="message" href="/guides/simulators/messages">
    Pair voice with SMS for multi-channel patient outreach.
  </Card>
</CardGroup>
