Overview
Hathora is a hosting provider for several models for voice AI, which can be utilized under the singleHathoraTTSService.
Hathora TTS API Reference
Pipecat’s API methods for Hathora-hosted TTS models
Example Implementation
Complete example using Hathora-hosted models
Hathora Models Documentation
Official Hathora documentation and features
Installation
To use Hathora services, install the required dependencies:Prerequisites
Hathora Account Setup
Before using Hathora STT services, you need:- Hathora Account: Sign up at Hathora Models Console
- API Key: Generate an API token from your Tokens page
Hathora Model Specifier
TheHathoraTTSService accepts a model: str parameter which corresponds to the model you would like to use.
You can find available specifiers here
Configuration
HathoraTTSService
Model to use. Find available models at models.hathora.dev.
Voice to use for synthesis (if supported by model).
Output sample rate for generated audio. When
None, uses the pipeline’s configured sample rate.API key for authentication. If
None, uses the HATHORA_API_KEY environment variable.Base API URL for the Hathora TTS service.
Runtime-configurable settings. See InputParams below.
InputParams
Configuration settings that can be set at initialization via theparams constructor argument.
| Parameter | Type | Default | Description |
|---|---|---|---|
speed | float | None | Speech speed multiplier (if supported by model). |
config | list[ConfigOption] | None | Additional model-specific configuration options. Each ConfigOption has name and value fields. Refer to Hathora docs for supported options per model. |
Usage
Basic Setup
With Voice and Speed
With Model-Specific Config
Notes
- Multi-model support: Hathora hosts several different TTS models under a single API. The
modelparameter determines which model is used. - Audio format handling: The service automatically detects whether the response is WAV or raw PCM and handles both formats transparently.
- Model-specific features: Not all models support all features (e.g.,
voice_id,speed,config). Refer to the Hathora documentation for model-specific capabilities.