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

# Rumik AI Text-to-Speech

> pipecat-rumik provides RumikTTSService (WebSocket streaming) and RumikHttpTTSService for TTS with Rumik AI's APIs.

> [!NOTE]
>
> **Community-maintained integration.** This service is built and
> maintained by
> [ira-rumik](https://github.com/ira-rumik)
> . Pipecat does not test or officially support it. Please report issues and
> request changes on the
> [source repository](https://github.com/ira-rumik/pipecat-rumik)
> . Learn more about
> [community integrations](https://docs.pipecat.ai/api-reference/server/services/community-integrations.md)
> .

## Overview

`pipecat-rumik` provides Pipecat text-to-speech services backed by Rumik AI's
TTS APIs. It exposes `RumikTTSService` for WebSocket-based synthesis in
interactive voice pipelines and `RumikHttpTTSService` for HTTP request/response
synthesis. Both services emit raw PCM audio frames (`TTSAudioRawFrame`).

> [card] [Source Repository](https://github.com/ira-rumik/pipecat-rumik)
>
> Source code, examples, and issues for the Rumik AI integration

> [card] [PyPI Package](https://pypi.org/project/pipecat-rumik/)
>
> The `pipecat-rumik` package on PyPI

> [card] [Rumik AI](https://rumik.ai/)
>
> Learn more about Rumik AI

> [card] [API Keys](https://playground.rumik.ai/)
>
> Create and manage your Rumik AI API keys

## Installation

This is a community-maintained package distributed separately from `pipecat-ai`:

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

## Prerequisites

### Rumik AI Account Setup

Before using either service, you need:

1. **API Key**: Create API keys from the [Rumik AI dashboard](https://playground.rumik.ai/)
2. **Gateway URL**: Use the gateway URL provided for your Rumik AI deployment

### Required Environment Variables

* `RUMIK_API_KEY`: Your Rumik AI API key
* `RUMIK_GATEWAY_URL`: Your Rumik AI gateway base URL

## Configuration

### RumikTTSService

**api\_key** `str` *required*

Rumik AI API key.

**gateway\_url** `str` *required*

Rumik AI gateway base URL.

**settings** `RumikTTSService.Settings` (default: None)

Runtime-configurable TTS settings. See [Settings](#settings) below.

**sample\_rate** `int` (default: 24000)

Output audio sample rate. Rumik currently returns 24 kHz PCM.

**full\_response\_aggregation** `bool` (default: True)

When true, buffer a complete LLM response before sending text to Rumik instead
of creating a separate TTS request for every sentence.

### RumikHttpTTSService

**api\_key** `str` *required*

Rumik AI API key.

**gateway\_url** `str` *required*

Rumik AI gateway base URL.

**aiohttp\_session** `aiohttp.ClientSession` *required*

Caller-owned HTTP session used for Rumik API requests.

**settings** `RumikHttpTTSService.Settings` (default: None)

Runtime-configurable TTS settings. See [Settings](#settings) below.

**sample\_rate** `int` (default: 24000)

Output audio sample rate. Rumik currently returns 24 kHz PCM.

### Settings

Both services use Pipecat's service settings pattern.
`RumikTTSService.Settings` and `RumikHttpTTSService.Settings` are aliases of
`RumikTTSSettings`.

| Parameter | Type | Default | Description |
| - | - | - | - |
| `model` | `str \| None` | `"muga"` | Rumik model identifier. |
| `voice` | `str \| None` | `None` | Preset speaker voice. Sent to Rumik as `speaker`. |
| `language` | `Language \| str \| None` | `None` | Reserved for Pipecat provider compatibility. |
| `description` | `str \| None` | `None` | Natural-language voice/style description for expressive models. |
| `f0_up_key` | `int \| None` | `None` | Pitch shift in semitones for preset speaker voices. |
| `temperature` | `float \| None` | `None` | Sampling temperature. When omitted, Rumik uses its API default. |
| `top_p` | `float \| None` | `None` | Nucleus sampling value. When omitted, Rumik uses its API default. |
| `top_k` | `int \| None` | `None` | Top-k sampling value. When omitted, Rumik uses its API default. |
| `repetition_penalty` | `float \| None` | `None` | Penalty applied to repeated tokens. When omitted, Rumik uses default. |
| `max_new_tokens` | `int \| None` | `None` | Maximum generated audio tokens. When omitted, Rumik uses its default. |

> [!NOTE]
>
> See the [source repository](https://github.com/ira-rumik/pipecat-rumik) for
> the authoritative, up-to-date list of settings.

## Usage

### WebSocket Service

```python theme={null}
import os

from pipecat_rumik import RumikTTSService

tts = RumikTTSService(
    api_key=os.environ["RUMIK_API_KEY"],
    gateway_url=os.environ["RUMIK_GATEWAY_URL"],
    settings=RumikTTSService.Settings(
        model="muga",
    ),
)
```

For expressive models, use the `voice` setting for preset speaker voices. The
service sends it to Rumik as `speaker`.

```python theme={null}
tts = RumikTTSService(
    api_key=os.environ["RUMIK_API_KEY"],
    gateway_url=os.environ["RUMIK_GATEWAY_URL"],
    settings=RumikTTSService.Settings(
        model="mulberry",
        voice="speaker_1",
        description=(
            "warm expressive Indian woman with clear Hinglish diction, natural "
            "pauses, gentle energy, and a friendly conversational delivery"
        ),
        f0_up_key=3,
    ),
)
```

### HTTP Service

```python theme={null}
import asyncio
import os

import aiohttp

from pipecat_rumik import RumikHttpTTSService


async def main():
    async with aiohttp.ClientSession() as session:
        tts = RumikHttpTTSService(
            api_key=os.environ["RUMIK_API_KEY"],
            gateway_url=os.environ["RUMIK_GATEWAY_URL"],
            aiohttp_session=session,
            settings=RumikHttpTTSService.Settings(
                model="mulberry",
                voice="speaker_2",
                description="calm female narrator",
            ),
        )


asyncio.run(main())
```

## Compatibility

Tested with Pipecat v1.3.0 and supports Pipecat `>=1.0.0,<2`. Check the [source
repository](https://github.com/ira-rumik/pipecat-rumik) for the latest tested
version and changelog.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.