The Typecast CLI (
cast) lets you convert text to speech right from your terminal. Play audio instantly, save to files, browse voices interactively, and control emotions — all without leaving the command line. Requires a Typecast API key.Installation
Login
Quick Start
By default,
cast plays audio immediately. Use the --out flag to save to a WAV or MP3 file instead.Features
Options
| Flag | Description | Default |
|---|---|---|
--voice-id | Voice ID | tc_60e5426de8b95f1d3000d7b5 |
--model | Model (ssfm-v30, ssfm-v21) | ssfm-v30 |
--language | Language code (ISO 639-3) | auto-detected |
--emotion | Emotion type: smart, preset | |
--emotion-preset | Preset emotion (requires --emotion preset) | |
--emotion-intensity | Emotion intensity 0.0–2.0 (requires --emotion preset) | 1.0 |
--prev-text | Previous sentence for context (--emotion smart only) | |
--next-text | Next sentence for context (--emotion smart only) | |
--volume | Volume (0–200) | 100 |
--pitch | Pitch in semitones (-12 to +12) | 0 |
--tempo | Tempo multiplier (0.5–2.0) | 1.0 |
--format | Output format (wav, mp3) | wav |
--seed | Random seed for reproducible output | |
--out | Save to file instead of playing |
Models
| Model | Languages | Emotions | Latency |
|---|---|---|---|
ssfm-v30 | 37 | 7 presets + smart emotion | Standard |
ssfm-v21 | 27 | 4 presets (normal, happy, sad, angry) | Low |
Emotions
- Smart Emotion
- Preset Emotion
AI automatically infers the appropriate emotion from the text. Only available with Optionally provide surrounding sentences for better context:
ssfm-v30.Voices
Interactive Picker
Interactive Picker
Browse, preview, and select voices interactively:Type to filter, then use these keys:
| Key | Action |
|---|---|
| P | Preview with current model/emotion preset |
| E | Preview with smart emotion (ssfm-v30 only) |
| S | Set as default voice |
| C | Copy voice ID to clipboard |
| Enter | Confirm and print voice ID |
| Esc | Go back |
Tournament
Tournament
Find your favorite voice through head-to-head elimination:
| Key | Action |
|---|---|
| P | Preview voice 1 |
| Q | Preview voice 2 |
| 1 | Pick voice 1 |
| 2 | Pick voice 2 |
Random
Random
Pick a random voice for experimentation:
List & Get
List & Get
List voices with filters:Available use cases:
Announcer, Anime, Audiobook, Conversational, Documentary, E-learning, Rapper, Game, Tiktok/Reels, News, Podcast, Voicemail, AdsGet details for a specific voice:Config
Set default values so you don’t have to pass flags every time:voice-id, model, language, emotion, emotion-preset, emotion-intensity, volume, pitch, tempo, format
Settings are resolved in the following priority:
Environment Variables
Any option can be set via environment variable using theTYPECAST_ prefix:
| Variable | Flag Equivalent |
|---|---|
TYPECAST_API_KEY | --api-key |
TYPECAST_VOICE_ID | --voice-id |
TYPECAST_MODEL | --model |
TYPECAST_LANGUAGE | --language |
TYPECAST_EMOTION | --emotion |
TYPECAST_EMOTION_PRESET | --emotion-preset |
TYPECAST_EMOTION_INTENSITY | --emotion-intensity |
TYPECAST_FORMAT | --format |
TYPECAST_VOLUME | --volume |
TYPECAST_PITCH | --pitch |
TYPECAST_TEMPO | --tempo |
Recipes
Read text from a file
Read text from a file
Pipe from another command
Pipe from another command
Batch generate audio files
Batch generate audio files
Audiobook with emotion
Audiobook with emotion
Smart emotion for natural delivery
Smart emotion for natural delivery
Reproducible output with a fixed seed
Reproducible output with a fixed seed
Use a different language
Use a different language
Adjust delivery style
Adjust delivery style
Troubleshooting
cast: command not found
cast: command not found
- Verify the installation completed successfully
- Homebrew: Run
brew list neosapience/tap/castto check - Go: Ensure
$GOPATH/binis in yourPATH - Try opening a new terminal session
Authentication error
Authentication error
- Run
cast loginto re-enter your API key - Verify your key is valid at Typecast API Console
- Run
cast logoutthencast loginto reset
No audio playback
No audio playback
- Try saving to a file instead:
cast "test" --out test.wav - Check your system audio output device
- Ensure your system volume is not muted
Resources
GitHub
Source code and releases
API Reference
Explore the Typecast API
Voice Library
Browse available voices
Typecast API Console
API home