Skip to main content

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

This will start recording from your microphone and display transcriptions in real-time.

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

Set computeOptions.audioEncoderCompute and textDecoderCompute to .cpuAndNeuralEngine for best performance.
Tune the audio buffer size and chunking strategy for your use case:
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