Overview
WhisperKit supports real-time streaming transcription from a microphone, allowing you to transcribe audio as it’s being spoken.Quick Start
Stream from Microphone
Building a Streaming App
Here’s how to implement real-time streaming in your own app:1. Initialize WhisperKit
2. Start Recording and Streaming
3. Process Audio Stream
Advanced Streaming Features
Voice Activity Detection (VAD)
Optimize streaming by detecting when speech is present:Eager Decoding Mode
Get even faster updates with eager streaming mode:Eager mode provides faster updates but may produce less accurate intermediate results.
Segment Confirmation
Track confirmed vs. unconfirmed segments:Complete Streaming Example
Here’s a full SwiftUI example with visualization:Audio Device Selection (macOS)
On macOS, you can select which audio input device to use:Performance Tips
Use Neural Engine
Use Neural Engine
Set
computeOptions.audioEncoderCompute and textDecoderCompute to .cpuAndNeuralEngine for best performance.Adjust Buffer Size
Adjust Buffer Size
Tune the audio buffer size and chunking strategy for your use case:
Reduce Fallback Count
Reduce Fallback Count
Lower
fallbackCount to reduce latency at the cost of accuracy:Next Steps
Basic Transcription
Learn the basics of file-based transcription
Local Server
Set up a server for non-Swift clients