🗣️ A macOS CLI tool for transcribing audio files using the new Apple Speech framework (macOS 26.0+).
- Offline or live-mode transcription using Apple’s latest SpeechTranscriber APIs
- Automatic language model download for the specified locale
- CLI output to a plain
.txt
file - Fully async Swift implementation
- macOS 26.0+
- Xcode 16 beta with macOS 26 SDK and command-line tools
swift build -c release
.build/release/apple-speechanalyzer-cli \
--input-audio-path <path-to-audio> \
--output-txt-path <path-to-output> \
[--locale <locale-id>] \
[--live]
Flag | Required | Type | Description |
---|---|---|---|
--input-audio-path |
✅ | String |
Path to input audio file (e.g., .flac , .wav ) |
--output-txt-path |
✅ | String |
Path to write output .txt transcription |
--locale |
❌ | String |
Locale for transcription (default: system locale) |
--live |
❌ | Flag |
Enable progressive live transcription (default: offline) |
.build/release/apple-speechanalyzer-cli \
--input-audio-path demo.flac \
--output-txt-path demo.txt \
--locale en-US
- Argument parsing: CLI args are parsed to configure audio input/output paths, locale, and mode.
- API check: Ensures your system is running macOS 26.0 or later.
- Speech model installation: Downloads locale-specific model if not already installed.
- Transcription:
- Runs
SpeechTranscriber
viaSpeechAnalyzer
- In
--live
mode, uses.progressiveLiveTranscription
for real-time feedback - Otherwise, defaults to
.offlineTranscription
- Runs
- Result saving: Aggregates transcribed
AttributedString
to plain text and writes to file.
✅ On success: transcript is saved to the specified output path.
❌ On error: descriptive messages printed to stderr
.
apple-speechanalyzer-cli is released under the MIT License. See LICENSE for more details.