> ## 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 uses [Stream Video](https://getstream.io/video/) for real-time WebRTC transport by default. [External WebRTC transports](/integrations/introduction-to-integrations#edge-transport) are supported as well. Most AI providers offer free tiers to get started.
</Info>

<Info>
  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-105b"),
    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:v3`)                        |
| `language`             | `str`   | `"hi-IN"`     | Target language code (e.g. `hi-IN`, `en-IN`)   |
| `speaker`              | `str`   | `"shubh"`     | Speaker voice id                               |
| `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                                   |
| `loudness`             | `float` | `None`        | Speech loudness                                |
| `temperature`          | `float` | `None`        | Sampling temperature                           |
| `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: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>
