WhisperKit: Speech-to-Text
Basic Transcription
Transcribe an audio file with just a few lines of code:WhisperKit supports multiple audio formats:
.wav, .mp3, .m4a, and .flacModel Selection
By default, WhisperKit automatically selects the best model for your device. To use a specific model:tiny
Fastest, lowest accuracy~150 MB
base
Good for mobile~290 MB
small
Balanced performance~967 MB
medium
High accuracy~3.1 GB
large-v3
Best accuracy~6.2 GB
distil-large-v3
Distilled large-v3~3.8 GB, faster
Advanced Transcription Options
Language Detection
Automatically detect the language of audio:Language detection only works with multilingual models. English-only models will throw an error.
Processing Multiple Files
Transcribe multiple audio files concurrently:Custom Models
Deploy your own fine-tuned models:TTSKit: Text-to-Speech
Basic Speech Generation
Generate speech from text:Model Selection
TTSKit provides two model variants:Voice and Language Selection
Choose from 9 built-in voices and 10 languages:.ryan- Male, neutral (default).aiden- Male, energetic.onoAnna- Female, warm.sohee- Female, clear.eric- Male, professional.dylan- Male, casual.serena- Female, smooth.vivian- Female, bright.uncleFu- Male, deep
.english, .chinese, .japanese, .korean, .german, .french, .russian, .portuguese, .spanish, .italian
Real-Time Streaming Playback
Play audio as itโs being generated:- .auto (Recommended)
- .stream
- .buffered
- .generateFirst
Automatically measures generation speed and buffers just enough to prevent gaps:
Generation Options
Customize sampling, chunking, and performance:Style Instructions (1.7B Only)
Control prosody with natural language instructions:Save Generated Audio
Export audio to WAV or M4A format:Progress Callbacks
Receive per-step updates during generation:Complete Examples
Combined Speech-to-Speech
Transcribe audio and generate speech response:Command Line Usage
Both WhisperKit and TTSKit are available via the CLI:- Speech Recognition
- Text-to-Speech
Performance Tips
Optimize Model Loading
Optimize Model Loading
Use
prewarm to compile models in the background:Reuse Model Instances
Reuse Model Instances
Initialize once and reuse:
Process Long Audio Efficiently
Process Long Audio Efficiently
Use chunking and VAD for long recordings:
TTSKit Prompt Caching
TTSKit Prompt Caching
Build prompt cache once for 90% faster subsequent generations:
Next Steps
API Reference
Explore detailed API documentation
Advanced Features
Learn about streaming, VAD, and custom models
Example Apps
Browse complete example applications
Best Practices
Optimization tips and production guidelines