On-device transcription workflow

Turns lecture and meeting recordings into proofreadable text without the audio leaving the machine.

#transcription#Whisper#on-device#hallucination checks#dual audit
On-device transcription engine

WorkflowOn-device transcription engine

Audio & transcription Local MacBook

A workflow that transcribes lecture and meeting recordings with mlx-whisper large-v3 on a local Mac. It flags silence and repetition hallucinations by machine, runs a read-only audit by Claude and Codex in parallel, and produces the text, a timeline file and a proofreading page in one go. No cloud speech recognition is used.

Challenge

  • Lecture and meeting recordings contain people's voices and internal talk, so sending them to a cloud speech service is not an option
  • Whisper invents stock phrases over silence and loops the same sentence; the longer the recording, the less a person can catch by eye

Approach

  • Transcription runs only on the local mlx-whisper large-v3, and its timeline is the reference. The audio files never leave the machine
  • Silent stretches are stopped by loudness before they reach the model; afterwards, repetitions and subtitle-style stock lines are detected. Claude and Codex then audit the text in parallel, read-only

Outcome

  • Each recording yields the text (md), per-segment provenance (asr.json), a proofreading page and a quality report
  • A run record lists which stages actually ran, so nobody assumes an audit happened when it did not. Failures always exit non-zero, and originals are never overwritten in place

The author transcribes lecture and meeting recordings routinely. Because they contain participants' voices and unpublished material, the first requirement was that the audio never leaves the local Mac. Transcription runs on mlx-whisper large-v3 on Apple Silicon, and its timeline is the reference.

On top sits a kernel that adds hallucination checks, the dual audit, a summary and the proofreading page; each kind of recording has a thin entry point that just calls the kernel. When needed, --secondary also runs a local second engine (Qwen3-ASR) and sends spots where it disagrees strongly with Whisper to a person.

The full workflow

TaskWhoInputsOutputs
1. Hand overAuthorauthor—Recording
2. Cut segmentsMain sessionRecordingSegments
3. TranscribeSilence gate + Speech enginesilence.py + whisper_batch.pySegmentsTimed text
4. Flag errorsHallucination scanhallucination.pyTimed textQuality report
5. Parallel auditDual auditors + Audit scriptClaude + Codex + audit.pyTimed textAudit report
6. SummarizeSummary scriptsummarize.pyTimed textSummary
7. PublishStage & publishstaging.pyTimed text, Quality report, Audit report, SummaryTranscript, Proof page, Run record
8. ProofreadAuthorauthorProof page, Quality reportCorrections
On-device transcription engine

8 steps · 2 roles · 6 tools · 1 loop · 2026-09-21 – 11-07 · 83 kernel commits

Cut the recording, transcribe it with the local Whisper, flag hallucinations by machine, let two models audit the text only, and publish the verified transcript and proofreading page in one go.

  • Steps 1–2 hand over and cut; steps 3–7 are one run of the kernel scripts; step 8 is a person proofreading
  • Audio never leaves this Mac. Only the transcribed text goes out, and the auditors can only read it
  • Division of labour: the main session picks the entry and cuts, scripts run steps 3–7, Claude and Codex audit, the author proofreads
  • What actually ran is judged by the run record, never by any description

Project folders involved (4)

This workflow does not live in one folder: it runs across projects.

stt_core (kernel)
The core: silence gate, Whisper, hallucination scan, audit, summary and publishing scripts with their tests
~/.claude/skills/transcribe
The entry skill: a table of entries and commands per kind of recording, callable from any project folder
(private) lecture library
A private lecture-library folder: lectures are transcribed there, with proofreading pages and a search index
(private) recordings
A private recordings folder: meetings and handheld-mic recordings go through the same kernel
Hand over

Step 1 · Author

Hand overaudio file

Hand over the recording and say what kind it is.

  • Lectures, meetings and handheld-mic recordings all go through one skill
  • If the kind of recording is unclear, the rule is to ask, not guess
  • Long jobs (over about two hours of audio) run in the background and report only completion or errors
OutputsRecording
Cut segments

Step 2 · Main session

Cut segmentsffmpeg

Pick the right entry and cut the audio.

  • An arbitrary file is cut with ffmpeg and a minimal md with one line per segment is written before the kernel runs
  • Anything already transcribed skips Whisper and only rebuilds the transcript and page
  • Duplicate copies of the same recording are transcribed only once

Claude CodeThe main session decides the entry by reading the skill's table

InputsRecording
OutputsSegments
Transcribe

Step 3 · Silence gate + Speech engine

Transcribemlx-whisper

Stop silent stretches, then transcribe with timestamps.

  • Segments with mean loudness below -45 dB are treated as silence and never reach Whisper (measured: silence about -87 dB, speech -21 to -31 dB)
  • Whisper's parameters are frozen; every run first checks them against the reference copy
  • Only one Whisper job uses the GPU at a time; a global lock makes others wait

Common misconceptionAdding a label like "Speaker:" to the transcription hint makes the model copy it into the text; removing it took echoes from 34 to 0 across 8 lectures

InputsSegments
OutputsTimed text
Flag errors

Step 4 · Hallucination scan

Flag errorsquality.json

Mark hallucinations such as loops and stock subtitle lines by machine.

  • It looks at loudness plus seven text features: repetition, stock subtitle lines, prompt echoes, text density and more
  • Each segment gets one of three verdicts: clean, suspect or hallucinated
  • It only marks, never edits; hallucinated segments are also kept out of the summary
InputsTimed text
OutputsQuality report
Parallel audit

Step 5 · Dual auditors + Audit script

Parallel auditclaude + codex

Send only the text to two models at once for a read-only audit.

  • Claude runs with no tools and Codex in read-only mode, each from an empty temporary folder
  • Spots both models flag independently are looked at first; a small local model failed to catch the term errors
  • Run in parallel: 113 s per recording on average (67–171 s), 39% faster than one after the other (measured on 8)

Claude CodeClaude here is not a subagent but a headless CLI called by the script

InputsTimed text
OutputsAudit report
Summarize

Step 6 · Summary script

Summarizesummarize

Summarize, with verbatim anchors back to the segments.

  • Every point carries a verbatim anchor, so it can be traced to its segment and second
  • About 66 s per recording on average (52–85 s)
  • It can be switched off (--no-summary)
InputsTimed text
OutputsSummary
Publish

Step 7 · Stage & publish

Publishstaging.py

Check everything in staging, then swap it in and write the run record.

  • Segment counts, the audio links in the transcript and leftover placeholders in the page are checked; one mismatch and nothing is published
  • Originals are backed up before anything is replaced; files are never rewritten in place
  • A failure always leaves an error file and exits non-zero
InputsTimed text, Quality report, Audit report, Summary
OutputsTranscript, Proof page, Run record
Proofread

Step 8 · Author

Proofreadproof page

Proofread in the page while listening.

  • Clicking a segment plays that part of the audio
  • Segments marked suspect are left for a person to decide where to cut
  • The page saves paragraph text only; notes written outside paragraphs are lost on a rerun

Common misconceptionRerunning an already transcribed recording rebuilds the transcript from the timeline file, so punctuation fixes must be replayed

InputsProof page, Quality report
OutputsCorrections

Loops and rework

  • Verification fails or the run is stopped → step 3: Read the error file, fix, rerun; segments already transcribed are read from the cache, not redone

Key points

Send text, not audio, to the audit. All speech recognition happens locally. Claude and Codex see only the transcribed text, and only read-only; the audit leaves its findings as a report and never rewrites the transcript.

Stop hallucinations on both sides of the model. Before the model, segments below a loudness threshold are treated as silence and skipped, because silence is what tends to produce stock phrases. After it, repeated sentences, subtitle-style stock lines and prompt echoes are detected and logged in a quality report.

Judge what ran by the record, not the docs. Each stage writes its status to a run record, and that record, not any description, is what counts. Failures always exit non-zero and leave an error file without overwriting originals, and a global lock lets only one Whisper job use the GPU at a time.