Metadata-Version: 2.4
Name: pipecat-typecast
Version: 0.1.0
Summary: Typecast TTS service integration for Pipecat
Project-URL: Homepage, https://github.com/ironyee/pipecat-typecast
Project-URL: Repository, https://github.com/ironyee/pipecat-typecast
Author: Jaebong Jeong
License: BSD 2-Clause License
        
        Copyright (c) 2024-2026, Jaebong Jeong
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License-File: LICENSE
Keywords: ai,korean,pipecat,tts,typecast,voice
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: aiohttp>=3.9.0
Requires-Dist: pipecat-ai>=0.0.62
Description-Content-Type: text/markdown

# pipecat-typecast

A community integration that adds [Typecast](https://typecast.ai) TTS support to [Pipecat](https://github.com/pipecat-ai/pipecat).

Typecast provides high-quality multilingual neural voices with fine-grained emotion and prosody controls.

## Installation

```bash
pip install pipecat-typecast
```

Or with `uv`:

```bash
uv add pipecat-typecast
```

## Usage

```python
from pipecat_typecast import TypecastTTSService

tts = TypecastTTSService(
    api_key="YOUR_TYPECAST_API_KEY",
    settings=TypecastTTSService.Settings(
        voice="tc_689450bdcce4027c2f06eee8",
        model="ssfm-v30",
    ),
)
```

### Emotion control

```python
tts = TypecastTTSService(
    api_key="YOUR_TYPECAST_API_KEY",
    settings=TypecastTTSService.Settings(
        voice="tc_689450bdcce4027c2f06eee8",
        model="ssfm-v30",
        emotion_type="preset",
        emotion_preset="happy",       # normal | happy | sad | angry | whisper | toneup | tonedown
        emotion_intensity=1.5,        # 0.0 – 2.0
    ),
)
```

### Prosody controls

```python
TypecastTTSService.Settings(
    voice="tc_689450bdcce4027c2f06eee8",
    audio_tempo=1.2,   # 0.5 – 2.0 (speech speed)
    audio_pitch=2,     # -12 to +12 semitones
    volume=120,        # 0 – 200
    seed=42,           # reproducible output
)
```

## Running the example

```bash
cd examples
TYPECAST_API_KEY=... DAILY_API_KEY=... DAILY_ROOM_URL=... OPENAI_API_KEY=... python typecast_tts_example.py
```

The example creates a voice agent in a Daily WebRTC room that responds to speech using Typecast TTS.

## Settings reference

| Setting | Type | Default | Description |
|---|---|---|---|
| `voice` | `str` | — | Typecast voice ID (required) |
| `model` | `str` | `ssfm-v30` | TTS model: `ssfm-v30` or `ssfm-v21` |
| `language` | `str` | auto | ISO 639-3 language code |
| `emotion_type` | `str` | — | `smart` or `preset` |
| `emotion_preset` | `str` | — | `normal`, `happy`, `sad`, `angry`, `whisper`, `toneup`, `tonedown` |
| `emotion_intensity` | `float` | `1.0` | Emotion intensity (0.0–2.0) |
| `previous_text` | `str` | — | Context before current utterance |
| `next_text` | `str` | — | Context after current utterance |
| `audio_tempo` | `float` | `1.0` | Speech speed (0.5–2.0) |
| `audio_pitch` | `int` | `0` | Pitch in semitones (-12 to +12) |
| `volume` | `int` | `100` | Volume (0–200) |
| `seed` | `int` | — | Seed for reproducible output |

## Pipecat compatibility

| pipecat-typecast | pipecat-ai |
|---|---|
| 0.1.x | >=0.0.62 |

## Maintainer

[@ironyee](https://github.com/ironyee)

## License

BSD 2-Clause — see [LICENSE](LICENSE).
