Skip to main content
The transcribe() method converts audio data to text using on-device speech recognition models like Whisper.

Basic Usage

Setup

Before transcribing, register the ONNX module and load an STT model:

Method Signatures

Simple Transcription

Returns just the transcribed text.

Transcription with Options

Returns detailed output including confidence and timestamps.

Buffer Transcription

Transcribe directly from an AVAudioPCMBuffer.

Audio Requirements

STTOutput

Examples

Recording and Transcribing

With Timestamps

Multi-Language Support

SwiftUI Voice Input

Model Management

Available Models

These are the Sherpa-ONNX Whisper models available as tar.gz archives: Register models with framework: .onnx, modality: .speechRecognition, and artifactType: .archive(.tarGz, structure: .nestedDirectory).

Error Handling

Streaming STT

Real-time transcription →

STT Options

Configure transcription →