Skip to main content

Overview

RespeecherTTSService generates speech from text using Respeecher’s 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.

Source Repository

Source code, examples, and issues for the Respeecher integration

PyPI Package

The pipecat-respeecher package on PyPI

Respeecher TTS API

Learn more about Respeecher’s real-time TTS API

API Keys

Create and manage your Respeecher Space API keys

Installation

This is a community-maintained package distributed separately from pipecat-ai:
pip install pipecat-respeecher

Prerequisites

Respeecher Account Setup

Before using the Respeecher TTS service, you need:
  1. Respeecher Account: Sign up at Respeecher Space
  2. API Key: Create a key from your API keys page

Required Environment Variables

  • RESPEECHER_API_KEY: Your Respeecher Space API key for authentication

Configuration

api_key
str
required
Respeecher API key for authentication.
settings
RespeecherTTSService.Settings
required
Respeecher TTS settings (model, voice, sampling params). See Settings below.
url
str
default:"wss://api.respeecher.com/v1"
WebSocket base URL for the Respeecher TTS API.
sample_rate
int
default:"None"
Audio sample rate. If None, uses the default sample rate.

Settings

Runtime-configurable settings passed via the settings constructor argument using RespeecherTTSService.Settings(...). The service requires a model and a voice to be set.
ParameterTypeDefaultDescription
voicestr(required)Voice ID used for synthesis.
modelstr"public/tts/en-rt"Model path. Use "public/tts/ua-rt" for the Ukrainian model.
sampling_paramsdict{}Sampling parameters used for speech synthesis.
See the source repository and Respeecher’s Sampling Parameters Guide for the authoritative, up-to-date list of options.

Usage

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:
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 for the latest tested version and changelog.