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

# Voice Simulation

> Test your Voice Agent's interaction capabilities with realistic voice simulations

## Voice Simulation Overview

Maxim's Voice simulation allows you to test how your AI agent handles voice interactions, ensuring natural conversations and appropriate responses to different speech patterns, accents and scenarios.

## Features of Voice Simulations

* Real-time audio streaming and transcription in interactive sessions
* Integration with providers of your choice ([Twilio](https://www.twilio.com/en-us), [VAPI](https://vapi.ai/), etc.)
* Supports [OpenAI Realtime](https://platform.openai.com/docs/guides/realtime) and [ElevenLabs](https://elevenlabs.io/) as the simulation agent voice. Adding an OpenAI API key enables the Realtime simulation agent. To use ElevenLabs as the simulation agent, you must also configure an ElevenLabs voice provider alongside the OpenAI API key.
* Multi-scenario testing with built-in voice evaluators

## Setting up Voice Simulations

<Steps>
  <Step title="Adding a New Voice Provider">
    * Go to Settings -> Voice Providers
    * Add a voice provider of your choice between Twilio / Vapi
    * Add its account SID and Auth Key for secure connection

          <img src="https://mintcdn.com/maximai/JU5cX64Wdb4JUor7/images/docs/evaluate/runs/img18.png?fit=max&auto=format&n=JU5cX64Wdb4JUor7&q=85&s=49b5e0ab152df6ae73873ab2bb8f0f27" alt="Voice Provider Configuration" width="1336" height="1238" data-path="images/docs/evaluate/runs/img18.png" />
  </Step>

  <Step title="Setup Voice Agent Details">
    * Go to Agents -> Voice Agents
    * Create a new agent, adding its name and description (simulation agent has context of this)
    * Add the phone number and country code of the voice agent

          <img src="https://mintcdn.com/maximai/0wwVbQL7A-oaqMAD/images/docs/evaluate/runs/img19.png?fit=max&auto=format&n=0wwVbQL7A-oaqMAD&q=85&s=fa1e19943f62c9868c3454d94d75afd1" alt="Voice Agent Setup" width="2248" height="1226" data-path="images/docs/evaluate/runs/img19.png" />
  </Step>

  <Step title="Define the Scenario and Persona">
    * Scenario: Conversation context and goals
    * Persona: Voice characteristics and style
    * First message initiator is configurable - default is simulation agent waiting for your voice agent to speak first

    <Note>
      If simulation agent speaks first is selected, ensure your voice agent waits before responding to maintain proper conversation turn-taking.
    </Note>

    <img src="https://mintcdn.com/maximai/0wwVbQL7A-oaqMAD/images/docs/evaluate/runs/img20.png?fit=max&auto=format&n=0wwVbQL7A-oaqMAD&q=85&s=ecabae1f5c36521900f066c81facc0f6" alt="Define Scenario" width="1060" height="1210" data-path="images/docs/evaluate/runs/img20.png" />
  </Step>
</Steps>

## Example Voice Simulation Run

Key features of the simulation run interface:

* Transcripts shown in real-time for both simulation agent and voice agent
* Audio recordings can be played back and downloaded
* Statistical conversation metrics like Average Response Latency, Average Pitch, Talk Ratio and Speech Rate

<img src="https://mintcdn.com/maximai/JU5cX64Wdb4JUor7/images/docs/evaluate/runs/img21.png?fit=max&auto=format&n=JU5cX64Wdb4JUor7&q=85&s=073695c361617e3c65464782998aa2d9" alt="Voice Simulation Run" width="2204" height="1224" data-path="images/docs/evaluate/runs/img21.png" />
