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

# Respeecher

> Real-time text-to-speech service implementation using Respeecher's streaming WebSocket API

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

## Overview

`RespeecherTTSService` generates speech from text using
[Respeecher's](https://www.respeecher.com/real-time-tts-api) real-time TTS API.
It streams audio over a WebSocket connection and supports voice customization
via sampling parameters, with both English and Ukrainian language models
available.

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

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

  <Card title="Respeecher TTS API" icon="book" href="https://www.respeecher.com/real-time-tts-api">
    Learn more about Respeecher's real-time TTS API
  </Card>

  <Card title="API Keys" icon="key" href="https://space.respeecher.com/api-keys">
    Create and manage your Respeecher Space API keys
  </Card>
</CardGroup>

## Installation

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

```bash theme={null}
pip install pipecat-respeecher
```

## Prerequisites

### Respeecher Account Setup

Before using the Respeecher TTS service, you need:

1. **Respeecher Account**: Sign up at [Respeecher Space](https://space.respeecher.com/)
2. **API Key**: Create a key from your [API keys page](https://space.respeecher.com/api-keys)

### Required Environment Variables

* `RESPEECHER_API_KEY`: Your Respeecher Space API key for authentication

## Configuration

<ParamField path="api_key" type="str" required>
  Respeecher API key for authentication.
</ParamField>

<ParamField path="settings" type="RespeecherTTSService.Settings" required>
  Respeecher TTS settings (model, voice, sampling params). See
  [Settings](#settings) below.
</ParamField>

<ParamField path="url" type="str" default="wss://api.respeecher.com/v1">
  WebSocket base URL for the Respeecher TTS API.
</ParamField>

<ParamField path="sample_rate" type="int" default="None">
  Audio sample rate. If `None`, uses the default sample rate.
</ParamField>

### Settings

Runtime-configurable settings passed via the `settings` constructor argument
using `RespeecherTTSService.Settings(...)`. The service requires a `model` and a
`voice` to be set.

| Parameter         | Type   | Default              | Description                                                   |
| ----------------- | ------ | -------------------- | ------------------------------------------------------------- |
| `voice`           | `str`  | (required)           | Voice ID used for synthesis.                                  |
| `model`           | `str`  | `"public/tts/en-rt"` | Model path. Use `"public/tts/ua-rt"` for the Ukrainian model. |
| `sampling_params` | `dict` | `{}`                 | Sampling parameters used for speech synthesis.                |

<Note>
  See the [source repository](https://github.com/respeecher/pipecat-respeecher)
  and Respeecher's [Sampling Parameters
  Guide](https://space.respeecher.com/docs/api/tts/sampling-params-guide) for
  the authoritative, up-to-date list of options.
</Note>

## Usage

```python theme={null}
import os
from pipecat_respeecher import RespeecherTTSService

tts = RespeecherTTSService(
    api_key=os.getenv("RESPEECHER_API_KEY"),
    settings=RespeecherTTSService.Settings(
        voice="samantha",
    ),
)
```

To use the Ukrainian language model, set the corresponding `model` and `voice`:

```python theme={null}
import os
from pipecat_respeecher import RespeecherTTSService

tts = RespeecherTTSService(
    api_key=os.getenv("RESPEECHER_API_KEY"),
    settings=RespeecherTTSService.Settings(
        voice="olesia-conversation",
        model="public/tts/ua-rt",
    ),
)
```

## Compatibility

Requires Pipecat v1.1.0 or newer and has been tested with v1.1.0. Check the
[source repository](https://github.com/respeecher/pipecat-respeecher) for the
latest tested version and changelog.
