> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.rubrichq.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.rubrichq.io/_mcp/server.

# Voice Testing

Voice testing runs RubricHQ's AI-simulated caller against your agent as a **real audio call**. Because there's a recording, voice runs produce both **transcript metrics** and **audio metrics** (response latency, interruptions, words-per-minute, voice clarity, and more).

Pick the integration that matches how your agent is reachable. Configure these under **Agent → Channels** (Phone or Web).

| Integration      | Channel | Your agent is…                           |
| ---------------- | ------- | ---------------------------------------- |
| Phone (Twilio)   | Phone   | Reachable at a phone number              |
| Vapi             | Web     | A Vapi assistant                         |
| Retell           | Web     | A Retell agent                           |
| Custom / LiveKit | Web     | Your own bot reachable in a LiveKit room |

---

## Phone (Twilio)

RubricHQ's caller bot dials your agent's phone number over Twilio and runs the scenario.

**Configure:** Agent → Channels → **Phone** → set the **phone number** RubricHQ should call.

This is the default channel for any agent with a phone number.

---

## Vapi

Test an existing **Vapi assistant** — no code required.

1. **Connect Vapi** once per workspace: **Settings → Integrations → Vapi** and paste your Vapi API key.
2. On the agent, choose **External Provider → Vapi** and set the **Assistant ID**.
3. RubricHQ starts a Vapi **web call** to that assistant and our caller bot talks to it. We automatically detect whether the assistant speaks first and adapt the opening accordingly.

> **Note**
>
> Optionally enable **auto-fetch calls** to pull the assistant's production calls into RubricHQ observability alongside your test runs.

→ Full setup (sync vs paste instructions, auto-fetch, phone/language): **[Vapi](/integrations/vapi)**.

---

## Retell

Test an existing **Retell agent**.

1. **Connect Retell** once per workspace: **Settings → Integrations → Retell** and paste your Retell API key.
2. On the agent, choose **External Provider → Retell** and set the **Agent ID**.
3. RubricHQ starts a Retell **web call** to that agent and runs the scenario.

→ Full setup: **[Retell](/integrations/retell)**.

---

## Custom / LiveKit

For your own voice bot, RubricHQ meets it in a **LiveKit room**. Our caller bot and your bot join the same room and talk over audio. Configure under **Agent → Channels → Web** with provider **LiveKit**.

> **Tip**
>
> Full guide with request/response examples and a reference bot runner: **[LiveKit](/integrations/livekit)** (or **[Daily](/integrations/daily)** for the Daily transport).

There are two **room-management** modes.

### Mode 1 — Client-managed (recommended for custom bots)

You create the room and join it; RubricHQ's caller bot joins the room you return.

**Config**

| Field             | Value                                                                                           |
| ----------------- | ----------------------------------------------------------------------------------------------- |
| `room_management` | `client`                                                                                        |
| `bot_runner_url`  | Your endpoint that creates a room and joins it, e.g. `https://your-bot.com/api/create-and-join` |

**Contract** — RubricHQ POSTs to your `bot_runner_url`; you create a LiveKit room, start your bot in it, and return credentials for RubricHQ's caller:

```http
POST {bot_runner_url}
→ 200
{ "room_url": "wss://your-livekit.cloud", "token": "<token for RubricHQ's caller bot>" }
```

### Mode 2 — RubricHQ-managed

RubricHQ creates the room and tells your bot runner to join it.

**Config**

| Field                | Value                                                                                                                               |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `room_management`    | `rubric`                                                                                                                            |
| `bot_runner_url`     | Your endpoint that joins an existing room                                                                                           |
| `livekit_agent_name` | (optional) named LiveKit agent to dispatch                                                                                          |
| LiveKit credentials  | `livekit_url` / `livekit_api_key` / `livekit_api_secret` — fall back to the workspace LiveKit integration or environment if omitted |

**Contract** — RubricHQ creates the room, then POSTs to your bot runner so it joins:

```http
POST {bot_runner_url}/api/session
{ "room_name": "rubric-<run>-<rand>", "bot_token": "<token>", "livekit_url": "wss://..." }
→ 200 { "status": "started", "room_name": "..." }
```

> **Tip**
>
> A reference bot runner only needs to: (1) accept the POST above, (2) join the LiveKit room with the provided token/URL, and (3) run your agent's audio pipeline. RubricHQ's caller bot handles its own side, records the call, and posts the transcript + metrics back automatically.

---

## Results

Voice runs include an **audio recording** (with per-speaker channels when available), the **transcript**, **transcript metrics**, and **audio metrics**. If a run ends abnormally you'll see an end reason (e.g. *silence timeout*, *could not connect*).

> **Warning**
>
> **Audio metrics** require the recording to be analyzed by the audio pipeline. Metrics that can't be computed without audio are never applied to text runs — see [Text Testing](/integrations/text-testing#metrics-on-text-runs).