agentleFS
jsathjsath/claude-skills/skills/video/use-local-whisper/SKILL.md

use-local-whisper

Skill14 starsChanged 34 days agoMITView on GitHub

Transcribe audio or video on your own machine with Whisper (mlx-whisper, faster-whisper or whisper.cpp) and get word-level timestamps as words.json, a plain .txt and an .srt. No API key, nothing uploaded. This is the transcription step the editing skills (edit-style, longform-edit, reel-captions) depend on. Use when asked to transcribe a take, get word timings, make an SRT, re-transcribe a final render for a caption sync check, or 'run whisper locally'.

  • Installs packages

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Not available on Claude.ai (no shell).

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Use local Whisper

One script, three backends, one output format. Everything downstream (cut lists, caption timing, sync gates) reads <stem>.words.json:

[
{"w": "Your", "s": 0.02, "e": 0.27},
{"w": "AI", "s": 0.27, "e": 0.4}
]

w = word as heard, s/e = start/end in seconds.

Requirements (Claude Code, on a computer)

  • ffmpeg (any build): brew install ffmpeg / apt install ffmpeg
  • Python 3.9+
  • One backend:
backendinstalldefault modeluse it when
mlxpip install mlx-whispermlx-community/whisper-large-v3-turboApple Silicon. Best word TIMING of the three
faster-whisperpip install faster-whisperlarge-v3-turboLinux/Windows, or CUDA
whisper-cppbrew install whisper-cpp (binary is whisper-cli)none, pass --modelno Python ML stack wanted

whisper.cpp model download (466 MB, English):

mkdir -p ~/whisper-models
curl -L -o ~/whisper-models/ggml-small.en.bin \
  https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.en.bin

Install check (prints which backend auto would use):

ffmpeg -version | head -1
python3 -c "import mlx_whisper" 2>/dev/null && echo mlx || \
python3 -c "import faster_whisper" 2>/dev/null && echo faster-whisper || \
command -v whisper-cli || echo "NO BACKEND: install one from the table"

Not available on Claude.ai (no shell). There, ask the user to upload an SRT instead.

Run it

python3 scripts/transcribe.py take.mov                       # auto backend, English
python3 scripts/transcribe.py take.mov --backend whisper-cpp --model ~/whisper-models/ggml-small.en.bin
python3 scripts/transcribe.py final.mp4 --out qa/ --words-per-cue 2
python3 scripts/transcribe.py interview.m4a --lang auto      # detect language

It extracts 16 kHz mono with ffmpeg first, so any container works (mov, mp4, m4a, wav). Output lands next to the input unless --out is given: <stem>.words.json, <stem>.txt, <stem>.srt.

Which model for which job

jobusewhy
Caption cue TIMING, sync gateslarge-v3-turbo (mlx or faster-whisper)small models drift 0.1 to 0.4 s per word on the same audio
Transcript text, cut lists, retake detectionsmall.en or turbotext quality is close; small.en is fast on CPU
Non-Englishlarge-v3-turbo with --lang <code>.en models are English only

Rules that save a re-do

  1. Text from the script, timing from Whisper. Whisper mishears names ("Cloud" for Claude). For captions, align the script's words to words.json and keep the script spelling (edit-style tools/make_cues.py does this). Keep a fix map ({"cloud code": "Claude Code"}) for anything with no script.
  2. Write numbers as digits in scripts. Whisper emits 2,000, not "two thousand", so a spelled-out script fails to align.
  3. Re-transcribe the FINAL render for the published SRT and any sync check. Times from the raw take are wrong after every cut.
  4. Whisper stamps the first word near 0.00 even when speech starts later. Find the real onset from audio energy before trimming the head, then re-transcribe the first 2 s to prove the first word survived.
  5. Long files (over ~30 min): fine with all three backends; expect roughly real-time / 10 on Apple Silicon with turbo. Run under nice -n 15 if someone is recording on the same machine.

Failure handling

symptomfix
no local Whisper foundinstall one backend from the table
whisper-cpp needs --modeldownload a ggml model (above) or set WHISPER_MODEL
whisper-cli not found but it is installedset WHISPER_BIN=/path/to/whisper-cli (launchd/cron PATHs often miss /opt/homebrew/bin)
empty or 0-word outputcheck the file has audio: ffprobe -v error -select_streams a -show_entries stream=codec_name -of csv=p=0 FILE
wrong language / gibberishpass --lang <code> explicitly
words glued together ("2,000files")whisper.cpp quirk on some builds; use mlx or faster-whisper for timing work

Output to report

whisper-cpp: 17 words, 5.68s -> o/take.words.json / .txt / .srt

Then hand the words.json path to the next skill (edit-style, longform-edit, reel-captions).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.