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

# Rumik AI

> Text-to-speech service implementations using Rumik AI's TTS APIs

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="ira-rumik" maintainerUrl="https://github.com/ira-rumik" repo="https://github.com/ira-rumik/pipecat-rumik" />

## 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`).

<CardGroup cols={2}>
  <Card title="Source Repository" icon="github" href="https://github.com/ira-rumik/pipecat-rumik">
    Source code, examples, and issues for the Rumik AI integration
  </Card>

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

  <Card title="Rumik AI" icon="book" href="https://rumik.ai/">
    Learn more about Rumik AI
  </Card>

  <Card title="API Keys" icon="key" href="https://playground.rumik.ai/">
    Create and manage your Rumik AI API keys
  </Card>
</CardGroup>

## Installation

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

```bash theme={null}
pip install 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

<ParamField path="api_key" type="str" required>
  Rumik AI API key.
</ParamField>

<ParamField path="gateway_url" type="str" required>
  Rumik AI gateway base URL.
</ParamField>

<ParamField path="settings" type="RumikTTSService.Settings" default="None">
  Runtime-configurable TTS settings. See [Settings](#settings) below.
</ParamField>

<ParamField path="sample_rate" type="int" default="24000">
  Output audio sample rate. Rumik currently returns 24 kHz PCM.
</ParamField>

<ParamField path="full_response_aggregation" type="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.
</ParamField>

### RumikHttpTTSService

<ParamField path="api_key" type="str" required>
  Rumik AI API key.
</ParamField>

<ParamField path="gateway_url" type="str" required>
  Rumik AI gateway base URL.
</ParamField>

<ParamField path="aiohttp_session" type="aiohttp.ClientSession" required>
  Caller-owned HTTP session used for Rumik API requests.
</ParamField>

<ParamField path="settings" type="RumikHttpTTSService.Settings" default="None">
  Runtime-configurable TTS settings. See [Settings](#settings) below.
</ParamField>

<ParamField path="sample_rate" type="int" default="24000">
  Output audio sample rate. Rumik currently returns 24 kHz PCM.
</ParamField>

### 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.
</Note>

## 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.
