Installation
- Homebrew
- From Source
Available Commands
WhisperKit CLI provides three main commands:transcribe
Transcribe audio files or streams
tts
Text-to-speech generation
serve
Start local server (requires BUILD_ALL=1)
Transcribe Command
Basic Usage
Transcribe an audio file:Command-Line Options
string[]
Paths to audio files to transcribe
string
Path to folder containing audio files (will transcribe all supported formats)
string
Path to local model files
string
Model to download if no model-path provided (e.g.,
tiny, base, small, medium, large-v3)string
default:"openai"
Model variant prefix:
openai or distilstring
default:"transcribe"
Task to perform:
transcribe or translatestring
Source language code (e.g.,
en, es, ja, zh)boolean
Enable verbose output with progress tracking
Audio Processing Options
float
default:"0.0"
Sampling temperature (0.0-1.0). Higher values increase randomness.
float
default:"0.2"
Temperature increase on decoding failures
int
default:"5"
Number of times to increase temperature
int
default:"5"
Number of candidates when sampling with non-zero temperature (topK)
Prompt and Prefix Options
string
Text to condition the model on. Useful for guiding transcription style.
string
Force prefix text when decoding
boolean
Force initial prompt tokens based on language, task, and timestamp options
boolean
Use decoder prefill data for faster initial decoding
Timestamp Options
boolean
Add timestamps for each word in output
boolean
Force no timestamps when decoding
float[]
List of timestamps to split audio into segments
Quality Thresholds
float
default:"2.4"
Gzip compression ratio threshold for decoding failure
float
default:"-1.0"
Average log probability threshold for decoding failure
float
default:"-1.5"
Log probability threshold for first token decoding failure
float
default:"0.6"
Probability threshold to consider segment as silence
Performance Options
string
default:"cpuAndNeuralEngine"
Compute units for audio encoder:
all, cpuOnly, cpuAndGPU, cpuAndNeuralEnginestring
default:"cpuAndNeuralEngine"
Compute units for text decoder:
all, cpuOnly, cpuAndGPU, cpuAndNeuralEngineint
default:"4"
Maximum concurrent inference workers (0 = unlimited)
string
default:"vad"
Audio chunking strategy:
none or vad (voice activity detection)Streaming Options
boolean
Process audio directly from microphone in real-time
boolean
Simulate streaming transcription using input audio file
Output Options
boolean
Generate SRT and JSON report files
string
default:"."
Directory to save reports
boolean
Skip special tokens in output
Usage Examples
Basic Transcription
Translation
Streaming Transcription
Word Timestamps
Using Prompts
Clipping Audio
Performance Tuning
Using Distil Models
Model Management
Downloading Models
Model Locations
Downloaded models are stored in:wav, mp3, m4a, flac, aiff, aac
Progress Tracking
When using--verbose, the CLI displays:
- Model loading time (encoder, decoder, tokenizer)
- Real-time progress bar with ETA
- Tokens per second
- Real-time factor (audio duration / transcription time)
- Speed factor (inverse of real-time factor)
Output Formats
Console Output
By default, prints transcription text to stdout:Report Files
With--report flag, generates:
SRT Subtitle Format
JSON Metadata
Troubleshooting
Model not found
Model not found
Download the model first:Then use the full path:
Invalid language code
Invalid language code
Check supported languages in the error message or see Constants.swift for valid codes.
Microphone permission denied
Microphone permission denied
Grant microphone access in System Settings → Privacy & Security → Microphone
Out of memory errors
Out of memory errors
- Use smaller models (tiny, base)
- Reduce concurrent worker count:
--concurrent-worker-count 1 - Use CPU-only compute units:
--audio-encoder-compute-units cpuOnly
Next Steps
Local Server
Run WhisperKit as an API server
Performance Optimization
Optimize transcription speed