Skip to main content
This guide will walk you through creating your first app with WhisperKit and TTSKit. Weโ€™ll cover both speech-to-text and text-to-speech functionality.

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 .flac

Model Selection

By default, WhisperKit automatically selects the best model for your device. To use a specific model:
Available models from the HuggingFace repo:

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:
Use whisperkittools to convert and upload your models to HuggingFace.

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:
Available Voices:
  • .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
Available Languages: .english, .chinese, .japanese, .korean, .german, .french, .russian, .portuguese, .spanish, .italian

Real-Time Streaming Playback

Play audio as itโ€™s being generated:
Playback Strategies:

Generation Options

Customize sampling, chunking, and performance:

Style Instructions (1.7B Only)

Control prosody with natural language instructions:
Style instructions only work with the 1.7B model. The 0.6B model ignores the instruction parameter.

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:

Performance Tips

Use prewarm to compile models in the background:
Initialize once and reuse:
Use chunking and VAD for long recordings:
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