Skip to main content

Quick Start

WhisperKit makes it easy to transcribe audio files on-device. This example shows how to get started with basic transcription.

Initialize WhisperKit

WhisperKit automatically downloads the recommended model for your device on first run.

Transcribe an Audio File

Supported audio formats: .wav, .mp3, .m4a, .flac

Selecting a Model

Using a Specific Model

Using Wildcards

The model search must return a single model from the source repo, otherwise an error will be thrown.

Available Models

For a complete list of available models, see the HuggingFace repo.

Custom Model Repository

If you’ve created your own fine-tuned model using whisperkittools, you can load it by specifying your repo:

Full Transcription Example

Here’s a complete example with error handling:

Command Line Usage

You can also use the WhisperKit CLI for quick testing:

Download Models First

If using the CLI from source:
Make sure git-lfs is installed before running download-model.

Transcribe from Command Line

Configuration Options

Model Compute Options

Optimize performance by selecting compute units:

Decoding Options

Customize the transcription behavior:

Next Steps

Real-Time Streaming

Learn how to transcribe audio in real-time from a microphone

Local Server

Set up a local transcription server with API clients