> Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

---
title: Pipecat
description: Use Vakyam TTS as the speech service in a Pipecat pipeline.
---

# Pipecat

Vakyam ships `VakyamTTSService` as a standalone
[Pipecat community integration](https://docs.pipecat.ai/api-reference/server/services/community-integrations)
(`pipecat-vakyam`). Install it next to `pipecat-ai`; it is versioned
independently of both Pipecat and the core [`vakyamai`](/sdks/python) SDK.

The service keeps a persistent [WebSocket](/guides/realtime-websocket)
connection and, by default, aggregates LLM output into sentences to match
Vakyam's one-utterance-per-message protocol.

> **Warning:**
> The `vakyamai[pipecat]` extra and `from vakyamai.pipecat import VakyamTTSService`
> are deprecated and will be removed. Switch to `pipecat-vakyam` — the service
> API is the same; only the package and import path change. See
> [Migrate from the old SDK extra](#migrate-from-the-old-sdk-extra).

## Install

```bash
pip install pipecat-vakyam
```

The package depends on [`vakyamai`](/sdks/python) for Vakyam's WebSocket
protocol helpers, and on `pipecat-ai` (`>=1.5,<2`). It is tested with Pipecat
v1.7.0. Source, issues, and examples live in the
[pipecat-vakyam repository](https://github.com/Vakyam-AI/pipecat-vakyam).

Set your API key:

```bash
export VAKYAM_API_KEY="vak_live_..."
```

## Create the TTS service

```python
from pipecat_vakyam import VakyamTTSService

tts = VakyamTTSService(
    settings=VakyamTTSService.Settings(
        voice="Archana",
        model="raaga-v1",
        language="ta-IN",
        speed=1.0,
    ),
)
```

The service reads `VAKYAM_API_KEY` from the environment by default; pass
`api_key="vak_live_..."` to set it explicitly.

Omit `sample_rate` unless you need a specific rate. Pipecat sets it from the
pipeline `StartFrame`. Supported values are `8000`, `16000`, `24000`, and
`48000`.

### Constructor parameters

- `api_key` (string) — Vakyam API key. Defaults to the `VAKYAM_API_KEY` environment variable.

- `sample_rate` (integer) — Output PCM sample rate in Hz: `8000`, `16000`, `24000`, or `48000`. When omitted, Pipecat supplies it from the pipeline `StartFrame`.

- `settings` (VakyamTTSService.Settings) — Runtime-updatable synthesis settings (see below).

- `text_aggregation_mode` (TextAggregationMode) — How Pipecat aggregates LLM text before synthesis. Defaults to sentence aggregation, which matches Vakyam's utterance-oriented API.

- `base_url` (string, default https://api.vakyam.ai) — API base URL. Defaults to production (`https://api.vakyam.ai`).

- `allow_insecure_base_url` (boolean, default false) — Allow non-localhost `http://` base URLs. Defaults to `false`.

### Settings

`VakyamTTSService.Settings` holds the synthesis configuration and can be
updated at runtime via Pipecat's `TTSUpdateSettingsFrame`:

- `voice` (string, default Archana) — Voice selector — a preset name (discover valid values with `GET /v1/voices`) or a custom voice ID beginning with `vc_`. See [Voices & languages](/concepts/voices-and-languages).

- `model` (string, default raaga-v1) — TTS model identifier.

- `language` (string, default ta-IN) — BCP 47 language code, such as `ta-IN`, `hi-IN`, or `en-IN`.

- `speed` (number, default 1.0) — Speech rate multiplier, `0.5`–`2.0`.

## Add it to your pipeline

Wire the service into your Pipecat pipeline alongside your transport, STT, and
LLM, as you would any other TTS service:

```python
from pipecat.pipeline.pipeline import Pipeline
from pipecat.pipeline.task import PipelineParams, PipelineTask
from pipecat_vakyam import VakyamTTSService

tts = VakyamTTSService(
    settings=VakyamTTSService.Settings(
        voice="Archana",
        model="raaga-v1",
        language="ta-IN",
    ),
)

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

> **Note:**
> The service holds a single persistent WebSocket. On barge-in it sends a `cancel`
> and keeps the socket open — it does not reconnect — so the next turn starts
> without new connection latency. See
> [Interrupting playback](/guides/realtime-websocket#interrupting-playback-barge-in).

## Migrate from the old SDK extra

If you still install `vakyamai[pipecat]`, switch the package and import. The
constructor and settings are unchanged. Keep `vakyamai` installed if you use the
core SDK elsewhere — `pipecat-vakyam` already depends on it.

```bash
pip install pipecat-vakyam
```

```python
# Before (deprecated)
from vakyamai.pipecat import VakyamTTSService

# After
from pipecat_vakyam import VakyamTTSService
```

---

*Powered by [holocron.so](https://holocron.so)*
