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

# Sarvam TTS

[Sarvam AI](https://www.sarvam.ai/) provides streaming text-to-speech using the Bulbul model, with configurable speaker, pace, and language support for Indian languages.

<Info>
  Vision Agents requires a [Stream](https://getstream.io/try-for-free/) account
  for real-time transport. Get your Sarvam API key from the [Sarvam
  dashboard](https://dashboard.sarvam.ai/).
</Info>

<Tip>
  Sarvam also provides [speech-to-text](/integrations/stt/sarvam) and an [LLM](/integrations/llm/sarvam). You can use all three in the same agent.
</Tip>

## Installation

```sh theme={null}
uv add "vision-agents[sarvam]"
```

## Quick start

```python theme={null}
from vision_agents.core import Agent, User
from vision_agents.plugins import sarvam, getstream, smart_turn

agent = Agent(
    edge=getstream.Edge(),
    agent_user=User(name="Sarvam Agent", id="agent"),
    instructions="Reply in the same language the user speaks.",
    llm=sarvam.LLM(model="sarvam-m"),
    stt=sarvam.STT(language="hi-IN"),
    tts=sarvam.TTS(speaker="shubh"),
    turn_detection=smart_turn.TurnDetection(),
)
```

<Warning>
  Set `SARVAM_API_KEY` in your environment or pass `api_key` directly.
</Warning>

## Parameters

```python theme={null}
tts = sarvam.TTS(
    model="bulbul:v3",
    language="hi-IN",
    speaker="shubh",
    pace=1.0,
)
```

| Name                   | Type    | Default       | Description                                                             |
| ---------------------- | ------- | ------------- | ----------------------------------------------------------------------- |
| `model`                | `str`   | `"bulbul:v3"` | TTS model (`bulbul:v2`, `bulbul:v3-beta`, or `bulbul:v3`)               |
| `language`             | `str`   | `"hi-IN"`     | Target language code (e.g. `hi-IN`, `en-IN`)                            |
| `speaker`              | `str`   | `"shubh"`     | Speaker voice id — must be compatible with the chosen model (see below) |
| `sample_rate`          | `int`   | `24000`       | Output sample rate in Hz                                                |
| `pace`                 | `float` | `None`        | Speech pace (bulbul:v3 supports 0.5–2.0)                                |
| `pitch`                | `float` | `None`        | Speech pitch (bulbul:v2 only)                                           |
| `loudness`             | `float` | `None`        | Speech loudness (bulbul:v2 only)                                        |
| `temperature`          | `float` | `None`        | Sampling temperature (bulbul:v3 and bulbul:v3-beta only)                |
| `enable_preprocessing` | `bool`  | `True`        | Normalize mixed-language and numeric text                               |
| `api_key`              | `str`   | `None`        | API key (defaults to `SARVAM_API_KEY` env var)                          |

### Speaker compatibility

Each model supports a specific set of speakers. Passing an incompatible speaker raises a `ValueError`.

| Model            | Speakers                                                                                                                                                                                                                             |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `bulbul:v2`      | `abhilash`, `anushka`, `arya`, `hitesh`, `karun`, `manisha`, `vidya`                                                                                                                                                                 |
| `bulbul:v3-beta` | `aayan`, `aditya`, `advait`, `amelia`, `amit`, `ashutosh`, `dev`, `ishita`, `kabir`, `kavya`, `manan`, `neha`, `pooja`, `priya`, `rahul`, `ratan`, `ritu`, `rohan`, `roopa`, `shubh`, `shreya`, `simran`, `sophia`, `sumit`, `varun` |
| `bulbul:v3`      | `aayan`, `aditya`, `advait`, `amelia`, `amit`, `ashutosh`, `dev`, `ishita`, `kabir`, `kavya`, `manan`, `neha`, `pooja`, `priya`, `rahul`, `ratan`, `ritu`, `rohan`, `roopa`, `shubh`, `shreya`, `simran`, `sophia`, `sumit`, `varun` |

## Next steps

<CardGroup cols={2}>
  <Card title="Sarvam STT" icon="microphone" href="/integrations/stt/sarvam">
    Streaming speech-to-text for Indian languages
  </Card>

  <Card title="Sarvam LLM" icon="brain" href="/integrations/llm/sarvam">
    Chat completions with Sarvam models
  </Card>
</CardGroup>
