SkillsGrove
SkillsGrove/Produção de vídeo/jsath/claude-skills/use-local-whisper

use-local-whisper

Instalação

$npx skills add https://github.com/jsath/claude-skills --skill use-local-whisper
$git clone --depth 1 https://github.com/jsath/claude-skills.git /tmp/claude-skills && mkdir -p ~/.claude/skills && cp -r /tmp/claude-skills/skills/video/use-local-whisper ~/.claude/skills/use-local-whisper
Por favor, instale esta Agent Skill para mim: https://github.com/jsath/claude-skills/tree/5f935e21c9cef2baf6106e6742e0fdd56f51ec78/skills/video/use-local-whisper. Leia primeiro o SKILL.md e os scripts, e só a instale na minha pasta de skills depois de confirmar que é segura.

Resumo

Descrição original · MITTranscribe 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'.
O SKILL.md abaixo é reproduzido de jsath/claude-skills (commit 5f935e2) sob a licença MIT. O texto não foi alterado; apenas os metadados do cabeçalho do arquivo foram omitidos, as imagens são exibidas como links e arquivos muito longos são truncados. Copyright 2026 johannships. Licença: LICENSE. Apenas o arquivo de instruções é exibido; consulte o repositório original para ver os scripts.

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:
backend install default model use it when
mlx pip install mlx-whisper mlx-community/whisper-large-v3-turbo Apple Silicon. Best word TIMING of the three
faster-whisper pip install faster-whisper large-v3-turbo Linux/Windows, or CUDA
whisper-cpp brew install whisper-cpp (binary is whisper-cli) none, pass --model no 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

job use why
Caption cue TIMING, sync gates large-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 detection small.en or turbo text quality is close; small.en is fast on CPU
Non-English large-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

symptom fix
no local Whisper found install one backend from the table
whisper-cpp needs --model download a ggml model (above) or set WHISPER_MODEL
whisper-cli not found but it is installed set WHISPER_BIN=/path/to/whisper-cli (launchd/cron PATHs often miss /opt/homebrew/bin)
empty or 0-word output check the file has audio: ffprobe -v error -select_streams a -show_entries stream=codec_name -of csv=p=0 FILE
wrong language / gibberish pass --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).

Ver o texto completo da licença (MIT)
MIT License

Copyright (c) 2026 johannships

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.