Practical overview
When it fits
Use SwiftWhisper when implementing Whisper-based transcription inside a Swift app or package and you can provide a model file and 16 kHz PCM audio frames.
Who it is for
- Swift developers adding speech-to-text to an iOS or macOS app.
- Package authors building audio transcription into a Swift package.
Documented uses
- Pass prepared audio frames to a Whisper model and retrieve transcription segments.
- Provide transcription progress, incremental segments, completion results and errors to an app through a delegate.
- Use the documented CoreML model-file arrangement where CoreML support is desired.
Requirements & limits
- The documented transcription call requires 16 kHz PCM audio frames and a model file URL.
- The README identifies whisper.cpp as the underlying transcription engine.
- The repository lists an MIT license.
- The README notes that Debug builds may be slower than optimized Release builds.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Transcribe 16 kHz PCM audio with SwiftWhisper
Connect a Swift target to SwiftWhisper and pass prepared audio frames to its transcription method.
Before you start
- A Swift package or Xcode project with Swift Package Manager support.
- A Whisper model file downloaded from the pretrained models referenced in the README.
- Audio frames in 16 kHz PCM format.
Steps
Add the SwiftWhisper repository as a package dependency in Package.swift or through Xcode’s Swift Package Manager interface.
Import SwiftWhisper and create a Whisper instance using the model file URL.
Pass the 16 kHz PCM frames to the asynchronous transcribe method and use the returned segments’ text.
Expected outcome
The documented API returns transcribed text in segments.
Guide limitations
- The guide covers the documented integration path; it is not a verification that a particular project or device will build or run.
- The audio input must be prepared as 16 kHz PCM frames.
Prepare an audio file as 16 kHz PCM input
Convert and resample an audio file into PCM floats for use as SwiftWhisper audio frames.
Before you start
- An audio file URL.
- AudioKit, which the README uses in its conversion example.
Steps
Configure AudioKit’s FormatConverter for WAV output at 16,000 Hz, 16-bit depth and one channel.
Convert the input file to a temporary output file.
Read the converted data and extract PCM values as floats, following the README example.
Expected outcome
The documented example produces an array of 16 kHz PCM floats suitable for passing as audio frames.
Guide limitations
- The README example leaves error handling for reading temporary data to the implementer.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- exPHAT/SwiftWhisper · Official homepage title · retained in its source language

