Skip to main content
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

1

Install

brew install neosapience/tap/cast
2

Login

cast login
You’ll be prompted to enter your API key. Get yours at Typecast API Console.You can also pass it directly:
cast login <api_key>
3

Verify

cast "Hello, world!"
If you hear audio playback, you’re all set!
For API details, see Typecast API Console.

Quick Start

# Play immediately
cast "Hello, world!"

# Use a specific voice
cast "Hello, world!" --voice-id tc_xxx

# Save to WAV file
cast "Hello, world!" --out hello.wav

# Save to MP3 file
cast "Hello, world!" --out hello.mp3 --format mp3
By default, cast plays audio immediately. Use the --out flag to save to a WAV or MP3 file instead.

Features

Options

FlagDescriptionDefault
--voice-idVoice IDtc_60e5426de8b95f1d3000d7b5
--modelModel (ssfm-v30, ssfm-v21)ssfm-v30
--languageLanguage code (ISO 639-3)auto-detected
--emotionEmotion type: smart, preset
--emotion-presetPreset emotion (requires --emotion preset)
--emotion-intensityEmotion intensity 0.0–2.0 (requires --emotion preset)1.0
--prev-textPrevious sentence for context (--emotion smart only)
--next-textNext sentence for context (--emotion smart only)
--volumeVolume (0–200)100
--pitchPitch in semitones (-12 to +12)0
--tempoTempo multiplier (0.5–2.0)1.0
--formatOutput format (wav, mp3)wav
--seedRandom seed for reproducible output
--outSave to file instead of playing

Models

ModelLanguagesEmotionsLatency
ssfm-v30377 presets + smart emotionStandard
ssfm-v21274 presets (normal, happy, sad, angry)Low
# Use ssfm-v21 for lower latency
cast "Hello, world!" --model ssfm-v21

Emotions

AI automatically infers the appropriate emotion from the text. Only available with ssfm-v30.
cast "I just got promoted!" --emotion smart
Optionally provide surrounding sentences for better context:
cast "I just got promoted!" --emotion smart \
  --prev-text "I have been working so hard this year." \
  --next-text "Let's celebrate tonight!"

Voices

Browse, preview, and select voices interactively:
cast voices pick
cast voices pick --gender female --age young_adult
cast voices pick --text "Custom preview sentence"
Type to filter, then use these keys:
KeyAction
PPreview with current model/emotion preset
EPreview with smart emotion (ssfm-v30 only)
SSet as default voice
CCopy voice ID to clipboard
EnterConfirm and print voice ID
EscGo back
Find your favorite voice through head-to-head elimination:
cast voices tournament
cast voices tournament --gender female --size 16
cast voices tournament --text "Custom preview sentence"
KeyAction
PPreview voice 1
QPreview voice 2
1Pick voice 1
2Pick voice 2
Pick a random voice for experimentation:
cast voices random
cast voices random --gender female --age young_adult
cast "Hello!" --voice-id $(cast voices random --model ssfm-v30 --gender female)
List voices with filters:
cast voices list
cast voices list --gender female
cast voices list --age young_adult
cast voices list --model ssfm-v30
cast voices list --use-case Audiobook
cast voices list --json
Available use cases: Announcer, Anime, Audiobook, Conversational, Documentary, E-learning, Rapper, Game, Tiktok/Reels, News, Podcast, Voicemail, AdsGet details for a specific voice:
cast voices get <voice_id>

Config

Set default values so you don’t have to pass flags every time:
cast config set voice-id tc_xxx
cast config set model ssfm-v21
cast config set volume 120

cast config list          # show current config
cast config unset volume  # remove a value
Available keys: voice-id, model, language, emotion, emotion-preset, emotion-intensity, volume, pitch, tempo, format Settings are resolved in the following priority:
--flag  >  environment variable  >  ~/.typecast/config.yaml  >  built-in default

Environment Variables

Any option can be set via environment variable using the TYPECAST_ prefix:
VariableFlag 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

cast "$(cat script.txt)"
echo "System is ready." | cast
cast "$(curl -s https://example.com/status.txt)"
cast "Chapter one." --out ch1.wav
cast "Chapter two." --out ch2.wav
cast "Chapter three." --out ch3.wav
# Narration in a calm tone
cast "It was a dark and stormy night." \
  --emotion preset --emotion-preset normal --emotion-intensity 0.5 --out intro.wav

# Exciting moment
cast "She opened the letter and gasped." \
  --emotion preset --emotion-preset happy --emotion-intensity 1.5 --out climax.wav

# Sad farewell
cast "He watched the train disappear into the fog." \
  --emotion preset --emotion-preset sad --out farewell.wav
cast "I can't believe we actually made it!" --emotion smart \
  --prev-text "We've been working on this for three years." \
  --next-text "Let's celebrate tonight!"
cast "Hello, world!" --seed 42 --out hello.wav
# Running again with the same seed produces identical audio
cast "Hello, world!" --seed 42 --out hello2.wav
cast "Bonjour le monde" --language fra
cast "こんにちは" --language jpn
cast "Buy now, limited time offer!" --tempo 1.3 --pitch 2
cast "Relax and take a deep breath." --tempo 0.85 --volume 90

Troubleshooting

  • Verify the installation completed successfully
  • Homebrew: Run brew list neosapience/tap/cast to check
  • Go: Ensure $GOPATH/bin is in your PATH
  • Try opening a new terminal session
  • Run cast login to re-enter your API key
  • Verify your key is valid at Typecast API Console
  • Run cast logout then cast login to reset
  • 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