pipecat-ai-typecast
Typecast TTS Integration for Pipecat AI Pipelines
Add high-quality neural voices from Typecast to your Pipecat AI pipelines.
Installation
Requires Python 3.11 or later, Pipecat 1.14.0 or later, and Typecast Python SDK 0.5.3 or later.
pip install pipecat-ai-typecast
Prerequisites
| Variable | Required | Description |
|---|---|---|
TYPECAST_API_KEY |
Yes | Get your API key here |
TYPECAST_VOICE_ID |
No | Voice override (defaults to tc_672c5f5ce59fac2a48faeaee) |
Quick Start
TypecastTTSService integrates Typecast's streaming text-to-speech into a Pipecat pipeline. It converts LLM text output into expressive speech while leveraging Pipecat's transport, STT, and turn-taking stack.
import os, aiohttp
from pipecat.pipeline.pipeline import Pipeline
from pipecat_typecast.tts import TypecastTTSService
async with aiohttp.ClientSession() as session:
llm = ...
stt = ...
tts = TypecastTTSService(
aiohttp_session=session,
api_key=os.getenv("TYPECAST_API_KEY"),
voice_id=os.getenv("TYPECAST_VOICE_ID", "tc_672c5f5ce59fac2a48faeaee"),
)
pipeline = Pipeline([
transport.input(), # audio/user input
stt, # speech to text
context_aggregator.user(), # add user text to context
llm, # LLM generates response
tts, # Typecast TTS synthesis
transport.output(), # stream audio back to user
context_aggregator.assistant(), # store assistant response
])
See example.py for a complete working example including event handlers and transport setup.
Configuration
TypecastTTSService exposes structured parameter models for emotion and audio control.
Set model to ssfm-v31, ssfm-v30 (default), or ssfm-v21. For v31, choose a
compatible voice with GET /v3/voices?model=ssfm-v31 and check its supported
emotions. Both v30 and v31 use PresetPromptOptions or SmartPromptOptions;
the v30 preset list in the examples does not define v31 voice capabilities.
ssfm-v30 (Default) - Preset Emotion Control
from pipecat_typecast.tts import (
TypecastTTSService,
TypecastInputParams,
PresetPromptOptions,
OutputOptions,
)
params = TypecastInputParams(
streaming=False, # Required when using volume.
prompt_options=PresetPromptOptions(
emotion_preset="happy", # normal | happy | sad | angry | whisper | toneup | tonedown
emotion_intensity=1.3, # 0.0 - 2.0
),
output_options=OutputOptions(
volume=110, # 0 - 200 (percent). Defaults to None
# so the server-side default of 100
# kicks in when neither this nor
# `target_lufs` is set.
audio_pitch=2, # -12 to 12 (semitones)
audio_tempo=1.05, # 0.5 - 2.0 (playback speed)
audio_format="wav", # Only 'wav' supported
# target_lufs=-16.0, # Absolute loudness target in LUFS
# (-70.0 to 0.0). Mutually exclusive
# with `volume` — leave `volume` unset
# when using `target_lufs`.
),
)
tts = TypecastTTSService(
aiohttp_session=session,
api_key=os.getenv("TYPECAST_API_KEY"),
voice_id="tc_672c5f5ce59fac2a48faeaee",
model="ssfm-v30",
params=params,
)
ssfm-v30 - Smart Emotion Control
For context-aware emotional delivery, use SmartPromptOptions which infers emotion from surrounding text:
from pipecat_typecast.tts import (
TypecastTTSService,
TypecastInputParams,
SmartPromptOptions,
)
params = TypecastInputParams(
prompt_options=SmartPromptOptions(
previous_text="I just got the best news ever!", # max 2000 chars
next_text="I can't wait to share this with everyone!",
),
)
tts = TypecastTTSService(
aiohttp_session=session,
api_key=os.getenv("TYPECAST_API_KEY"),
params=params,
)
Legacy Model (ssfm-v21)
For backward compatibility with ssfm-v21
from pipecat_typecast.tts import (
TypecastTTSService,
TypecastInputParams,
PromptOptions,
)
params = TypecastInputParams(
prompt_options=PromptOptions(
emotion_preset="happy", # normal | happy | sad | angry
emotion_intensity=1.3,
),
)
tts = TypecastTTSService(
aiohttp_session=session,
api_key=os.getenv("TYPECAST_API_KEY"),
model="ssfm-v21",
params=params,
)
Parameter Reference
| Parameter | Range | Description |
|---|---|---|
emotion_preset |
varies by voice | ssfm-v30 adds: whisper, toneup, tonedown |
emotion_intensity |
0.0 - 2.0 | Values > 1.0 increase expressiveness |
audio_pitch |
-12 to 12 | Semitone adjustment |
audio_tempo |
0.5 - 2.0 | Recommended: 0.85 - 1.15 |
volume |
0 - 200 | Defaults to None (server-side default of 100 applies). Mutually exclusive with target_lufs. |
target_lufs |
-70.0 to 0.0 | Absolute loudness normalization target in LUFS. Server rejects requests that set both target_lufs and volume — leave volume unset when using target_lufs, or the model raises a ValidationError locally. |
seed |
integer | Deterministic synthesis for identical text |
streaming |
boolean | Defaults to True and uses Typecast's HTTP streaming endpoint. Set False for volume-based non-streaming synthesis. |
Running the Example
# 1. Install dependencies
uv sync
# 2. Configure environment
cp env.example .env
# 3. Run
uv run python example.py
The bot will create a call (e.g. Daily room) and speak responses using Typecast voices.
Compatibility
| Requirement | Version |
|---|---|
| Pipecat | v1.14.0+ |
| typecast-python | v0.5.3+ |
| Python | 3.11+ |
| Transports | Daily / Twilio / WebRTC |
Support
- API Documentation: typecast.ai
- Pipecat Discord: discord.gg/pipecat (
#community-integrations)
Maintainer: Neosapience / Typecast team (@neosapience)
BSD-2-Clause License
Metadata
Release files for pipecat-ai-typecast 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pipecat_ai_typecast-0.4.0.tar.gz | 270.3 kB | Without provenance | Details for pipecat_ai_typecast-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pipecat_ai_typecast-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for pipecat_ai_typecast-0.4.0-py3-none-any.whl |
Total release size: 280.8 kB
Release files / pipecat_ai_typecast-0.4.0.tar.gz
| Download URL | pipecat_ai_typecast-0.4.0.tar.gz |
|---|---|
| Size | 270.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b041c12abfddb4eb45b8dfc812d4e07873aa496a2f73bbc05f5b5946e8025136
|
|
BLAKE2b-256 checksum How to use checksums |
0c5d6958af5fbb21452a5b7f519fc8f7a6df84f72ebbfa6572f9434c81b8879f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / pipecat_ai_typecast-0.4.0-py3-none-any.whl
| Download URL | pipecat_ai_typecast-0.4.0-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0148831d37110df99d4d4cedfb5fc4f28ae0f3f9c6d4b18b5496b2e5b36232f9
|
|
BLAKE2b-256 checksum How to use checksums |
77f8e0005a6ef693f14ece352703991804447aed3de5bf46f9201b34da1b69ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Security for pipecat-ai-typecast 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.