# Test Drive

> Talk to your voice agent from the browser with your microphone — no phone number, no carrier, no PSTN charges. The fastest way to hear whether it works.

Test Drive opens a two-way audio session between your microphone and an agent,
straight from the console. There is no phone number involved, no carrier leg and
no per-minute telephony charge.

Use it as the **first** check after wiring an agent up, before you go near a
number. It removes the entire telephony path from the picture, so a failure here
is unambiguously the agent — which is exactly the ambiguity that makes a first
call hard to debug.

> **NOTE:**
> Test Drive works for agents running on the platform **and** for external agents
> you run yourself. If your worker shows as connected, you can talk to it.

## Running one

1. Open the agent in the voice console.
2. Start **Test Drive** on the agent. From the **External agents** list there is
   a Test Drive action on each agent's row.
3. Allow microphone access when the browser asks.
4. Speak. You should hear the agent answer, and see the transcript fill in as
   the turns complete.

Stop the session from the console when you are done — see
[Ending a session](#ending-a-session) for why the button matters.

## What it exercises, and what it does not

| Exercised | Not exercised |
| --- | --- |
| Your agent's speech-to-text, model and voice | SIP signalling and the carrier leg |
| Turn-taking and barge-in | DTMF from a real handset |
| The audio path in both directions | Number routing and dispatch rules |
| Transcript reporting | PSTN codec transcoding |

That split is the point. If the agent sounds right in Test Drive and wrong on a
real call, the problem is in telephony. If it sounds wrong in both, the problem
is in your agent.

## Audio is narrowband, on purpose

Test Drive carries **16-bit PCM at 8 kHz** in both directions, the same
narrowband rate a telephone call uses. It is not a higher-quality preview of
your agent.

This is deliberate, and it is the single most useful thing Test Drive catches
early: an agent whose speech-to-text or text-to-speech is pinned to 16 kHz or
24 kHz will sound wrong here in exactly the way it will sound wrong on a call.
Fix the rate when you hear it, rather than after your first customer does.

The media itself rides the same transport as everything else on the platform —
Media over QUIC, over WebTransport — so a browser that can reach the relay can
run a Test Drive.

## Ending a session

Closing the browser tab is not enough on its own, which is why the console has
an explicit stop.

Ending the session properly does three things that matter to you:

- closes your speech and model provider sessions, so nothing keeps billing for
  a conversation nobody is having,
- releases an external worker from the job, so it is free for the next call,
- tears down the media path.

If you script Test Drive in a test harness, stop the session in your teardown.

## When it does not connect

Work through these in order. They are ordered by how often each is the cause.

  1. **The agent is not connected**
Check that the console shows your worker connected before starting a Test
    Drive. The platform cannot route audio to a worker that has not registered,
    and the failure surfaces as silence rather than an error.
  2. **The microphone was blocked**
A denied microphone permission produces a session that opens and then sends
    nothing. Check the browser's site permissions.
  3. **You hear nothing back**
Silence in one direction, with the session otherwise healthy, is usually a
    sample-rate mismatch in the agent. Confirm your pipeline is running at
    8 kHz.
  4. **The transcript stays empty**
The call can be perfectly audible and the transcript still be empty. If your
    agent runs its own speech-to-text, it has to send each turn back to the
    platform — otherwise nothing reaches the transcript, the analytics timeline
    or the transcript webhook. See the
    [agent recipe](/modalities/voice/recipes/typescript-agent) for the call.

## Next

Once Test Drive sounds right, assign a phone number to the agent and place a
real call. Everything Test Drive skipped — signalling, routing, the carrier —
enters at that point, and you will know the agent itself is already good.

- [Inbound calls](/modalities/voice/transport-telephony/inbound)
- [Outbound calls](/modalities/voice/transport-telephony/outbound)
- [Observability](/modalities/voice/observability/overview) — call traces and
  latency once real calls are flowing
