gitwtfhub

wtf is speech-analyzer-cli?

simonw/speech-analyzer-cli — explained in plain English

Analysis updated 2026-05-18

20SwiftAudience · developerComplexity · 2/5Setup · moderate

TL;DR

A macOS command line tool that transcribes audio files entirely on-device using Apple's SpeechAnalyzer, with text, JSON, and subtitle output formats.

Mindmap

mindmap
  root((speech-analyzer-cli))
    What it does
      On-device transcription
      Multiple output formats
    Requirements
      macOS 26 plus
      Apple silicon
      Xcode 26
    Outputs
      Plain text
      JSON with timing
      SRT and WebVTT
    Tech stack
      Swift
      SpeechAnalyzer framework
    Audience
      macOS developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Transcribe interviews or recordings into plain text or word level JSON entirely on-device.

REASON 2

Generate SubRip or WebVTT subtitle files from an audio recording for video captioning.

REASON 3

Build a pipeline that processes many audio files locally without sending them to a cloud transcription service.

What's in the stack?

SwiftmacOSSpeechAnalyzer

How it stacks up

simonw/speech-analyzer-cliandyhuo520/inkdiaryddasy/sleepbar
Stars202020
LanguageSwiftSwiftSwift
Setup difficultymoderatemoderateeasy
Complexity2/53/51/5
Audiencedevelopervibe codergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires macOS 26+ on Apple silicon and Xcode 26 or its command line tools to build.

Wtf does this do

speech-analyzer-cli is a small macOS command line tool that transcribes prerecorded audio files using Apple's own on-device SpeechAnalyzer and SpeechTranscriber technology. It takes an audio file and turns the spoken words into text, and can output that text in several formats: plain text, JSON with word level timing and confidence scores, JSONL with one word per line, or subtitle formats like SubRip and WebVTT for video captioning. Because it relies on Apple's newest on-device speech framework, it only runs on macOS 26 or later, on Apple silicon Macs that the framework supports, and needs Xcode 26 or the matching command line tools installed to build. The first time someone transcribes audio in a given language, the tool may need to download a language model from Apple over the network, but the actual transcription itself happens entirely on the device rather than being sent to a server. Installation is done through a shell script that builds a small application bundle and places a command called speech-analyzer on the user's path. That bundle exists mainly to supply the permission information macOS requires before it will let an app use Speech Recognition, so the first run prompts the user to grant that permission through System Settings. The JSON output includes the source file path, the detected or chosen language locale, the full transcribed text, and a list of individual words with their start and end times. The README notes that these word level timings are useful for syncing captions to playback but should not be treated as exact silence boundaries. The tool also supports listing all available language locales and choosing one directly when transcribing.

Yoink these prompts

Prompt 1
Show me the command to transcribe interview.m4a and save word level timing as JSON.
Prompt 2
Explain how to install this tool and grant it Speech Recognition permission on macOS.
Prompt 3
Help me generate a WebVTT subtitle file from an audio recording using this tool.
Prompt 4
Why does this tool need a network connection the first time I use a new language?

Frequently asked questions

wtf is speech-analyzer-cli?

A macOS command line tool that transcribes audio files entirely on-device using Apple's SpeechAnalyzer, with text, JSON, and subtitle output formats.

What language is speech-analyzer-cli written in?

Mainly Swift. The stack also includes Swift, macOS, SpeechAnalyzer.

How hard is speech-analyzer-cli to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is speech-analyzer-cli for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.