Set defaults
Store default values so you do not 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
cast config unset volume
Available keys: voice-id, model, language, emotion, emotion-preset, emotion-intensity, volume, pitch, tempo, format, remove-silence-ms
Resolution order
Settings are resolved in this priority order:
--flag > environment variable > ~/.typecast/config.yaml > built-in default
Environment variables
Any option can be set via environment variable using the TYPECAST_ 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 |
TYPECAST_REMOVE_SILENCE_MS | --remove-silence-ms |
Control silence duration
Use --remove-silence-ms with Cast v1.0.10 or later. The default is unset, not 0.
cast "Hello. Thank you for listening." --voice-id tc_672c5f5ce59fac2a48faeaee --remove-silence-ms 300
remove_silence_ms specifies the silence duration to retain, not the amount to remove. Use an integer from 0 to 1000 ms. 0 removes detected silence; omission or null disables duration-based silence removal.
Standard, streaming, and timestamp TTS use output.remove_silence_ms; Compose uses segments[].output.remove_silence_ms on each tts segment. Returned timestamps align with the processed audio, and explicit pause segments are preserved.
Streaming's default leading-silence trimming is separate. Small values such as 0 can leave gaps between playable chunks; allow sufficient playback buffering and test with your content.
export TYPECAST_REMOVE_SILENCE_MS=300
cast config set remove-silence-ms 300
cast config unset remove-silence-ms
The environment variable is TYPECAST_REMOVE_SILENCE_MS; the YAML key is remove_silence_ms. Existing precedence applies: flag → environment → config file → default.