Overview
TypecastTTSService converts text into expressive, lifelike speech using
Typecast’s neural voices. It supports emotion control
and audio customization, and integrates Typecast’s streaming text-to-speech into
a Pipecat pipeline.
Source Repository
Source code, examples, and issues for the Typecast integration
PyPI Package
The
pipecat-ai-typecast package on PyPITypecast Website
Learn more about Typecast’s text-to-speech voices
API Keys
Create and manage your Typecast API keys
Installation
This is a community-maintained package distributed separately frompipecat-ai:
Prerequisites
Typecast Account Setup
Before using the Typecast TTS service, you need:- Typecast Account: Sign up at Typecast
- API Key: Create a key from the Typecast API key page
Required Environment Variables
TYPECAST_API_KEY: Your Typecast API key for authentication (required)TYPECAST_VOICE_ID: Voice ID override (optional; defaults to the service’s built-in voice)
Configuration
aiohttp.ClientSession
required
Active aiohttp client session used for Typecast API requests.
str
default:"None"
Typecast API key. Falls back to the
TYPECAST_API_KEY environment variable if
not provided.str
default:"None"
Voice ID to use. Falls back to the
TYPECAST_VOICE_ID environment variable,
or the service’s built-in default voice.str
default:"ssfm-v30"
Typecast model version. Use
ssfm-v30 (default) or the legacy ssfm-v21.str
default:"https://api.typecast.ai/v1/text-to-speech"
Typecast API endpoint URL.
int
default:"44100"
Audio sample rate in Hz.
TypecastInputParams
default:"None"
Advanced configuration parameters for language, seed, emotion, and audio
output. See Input Parameters below.
Input Parameters
Advanced settings passed via theparams constructor argument using
TypecastInputParams(...).
prompt_options accepts one of:
PresetPromptOptions(ssfm-v30):emotion_preset(e.g.normal,happy,sad,angry,whisper,toneup,tonedown) andemotion_intensity(0.0–2.0).SmartPromptOptions(ssfm-v30):previous_textandnext_text(max 2000 chars each) for context-aware emotion inference.PromptOptions(legacy ssfm-v21):emotion_presetandemotion_intensity.
OutputOptions fields:
Available parameters and defaults are defined by the integration and the
selected Typecast model. See the source
repository for the
authoritative, up-to-date list.
Usage
example.py
in the source repository for a complete working bot.