Skip to content

feat(typecast): add Typecast TTS plugin#5275

Open
jaebong-human wants to merge 1 commit intolivekit:mainfrom
jaebong-human:feat/typecast-tts-plugin
Open

feat(typecast): add Typecast TTS plugin#5275
jaebong-human wants to merge 1 commit intolivekit:mainfrom
jaebong-human:feat/typecast-tts-plugin

Conversation

@jaebong-human
Copy link
Copy Markdown

@jaebong-human jaebong-human commented Mar 30, 2026

Summary

  • Adds a new TTS plugin for Typecast, a text-to-speech API supporting 37 languages
  • Implements the standard ChunkedStream pattern (HTTP POST → binary audio)
  • Verified working against the live Typecast API

Features

  • Models: ssfm-v30 (latest), ssfm-v21
  • Emotion control: smart (AI-inferred from context) or preset (normal / happy / sad / angry / whisper / toneup / tonedown) with intensity 0.0–2.0
  • Output: WAV or MP3, 44100 Hz mono
  • Parameters: audio_tempo (0.5–2.0×), audio_pitch (±12 semitones), volume (0–200), seed
  • Languages: 37 languages including English, Japanese, Chinese, Korean, and more
  • API key via TYPECAST_API_KEY env var or constructor argument

Usage

from livekit.plugins.typecast import TTS

# Smart emotion (default)
tts = TTS(voice_id="tc_672c5f5ce59fac2a48faeaee")

# Preset emotion
tts = TTS(
    voice_id="tc_672c5f5ce59fac2a48faeaee",
    emotion_type="preset",
    emotion_preset="happy",
    emotion_intensity=1.2,
    language="kor",
)

Test plan

  • Import and plugin registration verified
  • ValueError raised when API key is missing
  • API key read from TYPECAST_API_KEY env var
  • Live API call returns 200 audio/mpeg with valid audio bytes
  • update_options works for all parameters including seed
  • content_type guard raises APIError on non-audio response

🤖 Generated with Claude Code

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 30, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

- Implements ChunkedStream pattern (HTTP POST → binary audio)
- Supports ssfm-v30 / ssfm-v21 models
- Emotion control: smart (AI-inferred) or preset (normal/happy/sad/angry/whisper/toneup/tonedown)
- Output: WAV or MP3, 44100 Hz mono
- Parameters: audio_tempo, audio_pitch, volume, seed
- API key via TYPECAST_API_KEY env var or constructor argument
- PEP 561 compliant (py.typed marker included)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jaebong-human jaebong-human force-pushed the feat/typecast-tts-plugin branch from 8e8b3d4 to bb4a12d Compare March 31, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants