> ## Documentation Index
> Fetch the complete documentation index at: https://daily-main.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Vakyam AI Text-to-Speech

> Add Tamil, Hindi, Telugu, and other Indian-language voices to a Pipecat pipeline with VakyamTTSService.

export const CommunityMaintained = ({maintainer, maintainerUrl, repo}) => <Note>
    <strong>Community-maintained integration.</strong> This service is built and
    maintained by{" "}
    <a href={maintainerUrl} target="_blank" rel="noreferrer">
      {maintainer}
    </a>
    . Pipecat does not test or officially support it. Please report issues and
    request changes on the{" "}
    <a href={repo} target="_blank" rel="noreferrer">
      source repository
    </a>
    . Learn more about{" "}
    <a href="/api-reference/server/services/community-integrations">
      community integrations
    </a>
    .
  </Note>;

<CommunityMaintained maintainer="Vakyam-AI" maintainerUrl="https://github.com/Vakyam-AI" repo="https://github.com/Vakyam-AI/pipecat-vakyam" />

## Overview

Use `VakyamTTSService` when your voice agent should speak Indian languages.
The service calls [Vakyam AI](https://www.vakyam.ai/) and returns streaming audio
you can play through any Pipecat transport.

Supported languages include Tamil, Hindi, Telugu, Marathi, Gujarati, Kannada,
Bengali, and Indian English. Choose a preset voice or a custom voice you have
cloned in Vakyam.

<CardGroup cols={2}>
  <Card title="Source Repository" icon="github" href="https://github.com/Vakyam-AI/pipecat-vakyam">
    Package source, the Daily example, and issue tracker
  </Card>

  <Card title="PyPI Package" icon="cube" href="https://pypi.org/project/pipecat-vakyam/">
    The `pipecat-vakyam` package on PyPI
  </Card>

  <Card title="Vakyam AI" icon="book" href="https://www.vakyam.ai/">
    Product overview, voices, and supported Indian languages
  </Card>

  <Card title="API Keys" icon="key" href="https://dashboard.vakyam.ai/api-keys">
    Create and manage your Vakyam AI API keys
  </Card>
</CardGroup>

## Installation

Install the community package. It is published separately from `pipecat-ai`:

```bash theme={null}
uv add pipecat-vakyam
```

## Prerequisites

### Account and API key

1. Create an account at [Vakyam AI](https://www.vakyam.ai/)
2. Copy an API key from [API Keys](https://dashboard.vakyam.ai/api-keys). Keys
   look like `vak_live_...`

Set it in the environment:

```bash theme={null}
export VAKYAM_API_KEY="vak_live_..."
```

## Configuration

<ParamField path="api_key" type="str" default="None">
  Vakyam API key. If omitted, the service reads `VAKYAM_API_KEY`.
</ParamField>

<ParamField path="settings" type="VakyamTTSService.Settings" default="None">
  Voice, language, model, and speaking rate. See [Settings](#settings).
</ParamField>

<ParamField path="base_url" type="str" default="https://api.vakyam.ai">
  Override this only for a non-production Vakyam endpoint.
</ParamField>

<ParamField path="allow_insecure_base_url" type="bool" default="False">
  Permit `http://` URLs that are not localhost. Leave this off in production.
</ParamField>

<ParamField path="sample_rate" type="int" default="None">
  Output rate in Hz (`8000`, `16000`, `24000`, or `48000`). Leave unset to use
  the pipeline's output sample rate.
</ParamField>

<ParamField path="text_aggregation_mode" type="TextAggregationMode" default="TextAggregationMode.SENTENCE">
  Defaults to sentence-sized chunks, which produces more natural spoken replies.
</ParamField>

### Settings

Pass these through `VakyamTTSService.Settings(...)`. They can also be updated
while the pipeline is running.

| Parameter  | Type    | Default      | Description                                                                   |
| ---------- | ------- | ------------ | ----------------------------------------------------------------------------- |
| `model`    | `str`   | `"raaga-v1"` | Vakyam model to use.                                                          |
| `voice`    | `str`   | `"Archana"`  | Preset name (for example `Archana`) or a custom voice ID starting with `vc_`. |
| `language` | `str`   | `"ta-IN"`    | Language code. See the table below.                                           |
| `speed`    | `float` | `1.0`        | Speaking rate from `0.5` (slower) to `2.0` (faster).                          |

### Languages

| Language       | Code    |
| -------------- | ------- |
| Tamil          | `ta-IN` |
| Hindi          | `hi-IN` |
| Marathi        | `mr-IN` |
| Telugu         | `te-IN` |
| Indian English | `en-IN` |
| Gujarati       | `gu-IN` |
| Bengali        | `bn-IN` |
| Kannada        | `kn-IN` |

<Note>
  Voice catalogs and language coverage can change. See [Voices and
  languages](https://docs.vakyam.ai/concepts/voices-and-languages) for the
  current list.
</Note>

## Usage

```python theme={null}
import os

from pipecat.pipeline.pipeline import Pipeline
from pipecat.pipeline.worker import PipelineParams, PipelineWorker
from pipecat_vakyam import VakyamTTSService

tts = VakyamTTSService(
    api_key=os.getenv("VAKYAM_API_KEY"),
    settings=VakyamTTSService.Settings(
        voice="Archana",
        language="ta-IN",
    ),
)

pipeline = Pipeline(
    [
        transport.input(),
        stt,
        context_aggregator.user(),
        llm,
        tts,
        transport.output(),
        context_aggregator.assistant(),
    ]
)
worker = PipelineWorker(pipeline, params=PipelineParams(allow_interruptions=True))
```

To speak Hindi instead of Tamil, change the language code:

```python theme={null}
tts = VakyamTTSService(
    settings=VakyamTTSService.Settings(
        voice="Archana",
        language="hi-IN",
    ),
)
```

## Compatibility

Last tested with Pipecat v1.7.0 (`pipecat-ai>=1.5,<2`). See the
[changelog](https://github.com/Vakyam-AI/pipecat-vakyam/blob/main/CHANGELOG.md)
for updates.
