Prerequisites
System Requirements
WhisperKit Requirements
WhisperKit Requirements
- macOS 14.0 or later (for development)
- Xcode 16.0 or later
- Target platforms:
- iOS 16.0+
- macOS 13.0+
- watchOS 10.0+
- visionOS 1.0+
TTSKit Requirements
TTSKit Requirements
- macOS 15.0 or later (for development)
- Xcode 16.0 or later
- Target platforms:
- iOS 18.0+
- macOS 15.0+
Device Recommendations
For optimal performance:- Minimum: iPhone 12 or M1 Mac (for WhisperKit)
- Recommended: iPhone 14 Pro or M2 Mac or later
- Models automatically scale to device capabilities
WhisperKit automatically selects the best model variant for your device. Older devices will use smaller, faster models while newer devices can leverage larger, more accurate models.
Swift Package Manager (Xcode)
The easiest way to add WhisperKit to your project is through Xcode’s Swift Package Manager integration.Select Version
Choose the version range or specific version. We recommend using the latest release:
- Dependency Rule: “Up to Next Major Version”
- Version: 0.9.0 (or latest)
Choose Library Products
Select the libraries you need:
- ✅ WhisperKit - for speech-to-text
- ✅ TTSKit - for text-to-speech
- Or select both if you need both features
Swift Package Manager (Package.swift)
If you’re building a Swift package or prefer editingPackage.swift directly:
Command Line Interface (Homebrew)
For command-line usage, install the WhisperKit CLI tool:Build from Source
For development or to access the latest features:Verify Installation
Create a simple test file to verify the installation:The first time you initialize WhisperKit or TTSKit, it will automatically download the recommended model for your device. This may take several minutes depending on your internet connection.
Offline Usage
To bundle models with your app for offline usage:Add Models to Bundle
Add the downloaded model folders to your Xcode project:
- Drag the model folder into your project
- Ensure “Copy items if needed” is checked
- Add to your app target
Troubleshooting
Build errors with Swift Package Manager
Build errors with Swift Package Manager
- Ensure Xcode 16.0+ is installed
- Clean build folder: Product > Clean Build Folder (⇧⌘K)
- Reset package caches: File > Packages > Reset Package Caches
- Check minimum deployment target matches requirements
Model download fails
Model download fails
- Check internet connectivity
- Verify HuggingFace Hub is accessible
- Try setting a custom
downloadBaseURL - Check available disk space (models can be several GB)
Runtime errors on device
Runtime errors on device
- Verify device meets minimum OS requirements
- Check that the model variant is appropriate for device memory
- Enable verbose logging:
WhisperKit(verbose: true) - Check available memory and close other apps
CoreML compilation warnings
CoreML compilation warnings
- First launch may show CoreML compilation messages - this is normal
- Use
prewarmModels()on first launch to compile models in background - Subsequent launches will be faster as compiled models are cached
Next Steps
Quick Start
Build your first speech recognition and TTS app
API Reference
Explore the complete API documentation