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

# Speech-to-Speech Agents

> Run a Bolna Voice AI agent on a single realtime model that hears and speaks directly, replacing the separate transcriber, LLM and synthesizer steps.

## What is a speech-to-speech agent?

A standard Bolna agent runs three services in a chain: a transcriber turns caller audio into text, an LLM decides what to say, and a synthesizer turns that back into audio. A speech-to-speech agent replaces all three with one model that takes audio in and produces audio out over a single connection.

Because the model never converts speech to text and back, it hears how something was said, not just what was said, and it answers without waiting for three services in sequence.

## When to choose speech-to-speech

Speech-to-speech suits agents where responsiveness and natural delivery matter more than fine control of each stage. The classic pipeline remains the better fit when you need a specific transcriber for a language or accent, a specific voice from a specific synthesizer, or per-stage control such as keyword boosting.

|                     | Speech-to-speech              | Transcriber + LLM + Synthesizer        |
| ------------------- | ----------------------------- | -------------------------------------- |
| Turn latency        | Lower, one connection         | Higher, three services in sequence     |
| Voice selection     | Provider's realtime voices    | Any supported synthesizer voice        |
| Language control    | Handled natively by the model | Chosen per transcriber and synthesizer |
| Tool calling        | Supported                     | Supported                              |
| Knowledge base      | Not supported                 | Supported                              |
| Multilingual config | Not supported                 | Supported                              |

## Supported providers

| Provider        | Key `provider` value | Docs                                |
| --------------- | -------------------- | ----------------------------------- |
| OpenAI Realtime | `openai_realtime`    | [OpenAI Realtime](/docs/openai-realtime) |
| Gemini Live     | `gemini_live`        | [Gemini Live](/docs/gemini-live)         |

## How to configure an agent

A speech-to-speech agent carries an `s2s` block in `tools_config` and no `llm_agent`, `transcriber` or `synthesizer`. The pipeline in `toolchain` is a single `s2s` stage.

```json theme={"system"}
{
  "task_type": "conversation",
  "toolchain": { "execution": "parallel", "pipelines": [["s2s"]] },
  "tools_config": {
    "input": { "provider": "plivo", "format": "wav" },
    "output": { "provider": "plivo", "format": "wav" },
    "s2s": {
      "provider": "openai_realtime",
      "provider_config": { "model": "gpt-realtime-2.1", "voice": "marin" }
    }
  }
}
```

### Shared settings

| Field                   | Type    | Default  | Description                                                                                                                                                                               |
| ----------------------- | ------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `provider`              | string  | required | `openai_realtime` or `gemini_live`                                                                                                                                                        |
| `provider_config`       | object  | required | Provider specific settings, see the pages above                                                                                                                                           |
| `welcome_audio_gate_ms` | integer | `1500`   | Caller audio ignored for this long after the greeting starts, so the agent's own voice does not trip the provider's voice activity detection. Only applies when a welcome message is set. |

## What carries over from a standard agent

Your prompt, welcome message, hangup message, `end_call` and `transfer_call`, custom tools with pre-call webhooks, DTMF, ambient noise, recording, transcripts, post-call extraction and billing all behave the same way. Barge-in is handled by the provider rather than by Bolna, and is tuned with the per-provider settings on the pages above.

## What is not supported

Knowledge base agents, graph agents, multilingual configuration and per-call voice overrides are unavailable on speech-to-speech agents, since each of them depends on a separate transcriber or synthesizer step. Backchanneling is also unavailable, because it plays pre-recorded clips keyed to a synthesizer voice.
