Communitygithub.com

jsath/claude-skills

Whisper(mlx-whisper、faster-whisper、whisper.cpp)を使用して、オーディオやビデオを自分のマシンで文字起こしし、単語レベルのタイムスタンプを含む words.json、プレーンな .txt、.srt を生成します。APIキーは不要で、アップロードも発生しません。これは、編集スキル(edit-style、longform-edit、reel-captions)が依存する文字起こしステップです。テイクの文字起こし、単語タイミングの取得、SRTの作成、最終レンダリングの再文字起こしによるキャプション同期確認、または「Whisperをローカルで実行」を求められた場合に使用します。

claude-skills とは?

このスキルは、Claude Code などの AI エージェントが、ユーザーのローカルマシン上で Whisper モデル(mlx-whisper、faster-whisper、whisper.cpp)を使って音声・動画ファイルを文字起こしするための統合インターフェースを提供します。主な成果物は、単語レベルの開始・終了時刻を持つ `words.json`、プレーンテキスト `.txt`、字幕ファイル `.srt` の3つです。API キーやクラウドへのアップロードは一切不要で、プライバシーが保たれます。このスキルは、特に動画編集パイプライン(edit-style によるカットリスト作成、longform-edit による長編編集、reel-captions によるショート動画字幕生成)の前段階として設計されており、後続のスキルはこのスキルが生成した `words.json` を読み込んで動作します。対応プラットフォームは Claude Code(コンピュータ上)で、Claude.ai ではシェルが利用できないため使用できません。バックエンドは Apple Silicon に最適化された mlx-whisper、Linux/Windows 向けの faster-whisper、Python の ML スタックを避けたい場合の whisper.cpp から選択でき、自動検出機能も備えています。大規模モデル(large-v3-turbo)は高い単語タイミング精度を提供する一方、小規模モデル(small.en)は高速に動作し、テキスト品質も実用的です。また、Whisper 特有の誤認識(固有名詞の聞き間違いなど)を補正するためのベストプラクティス(スクリプトからのテキスト流用、数字表記の統一、最終レンダリングの再文字起こしなど)も文書化されており、実運用を見越した設計になっています。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/jsath/claude-skills/tree/HEAD/skills/use-local-whisper

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

ローカル Whisper を使う

1つのスクリプト、3つのバックエンド、1つの出力形式。下流のすべての処理(カットリスト、キャプションタイミング、同期ゲート)は <stem>.words.json を読み取ります:

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

w = 認識された単語、s/e = 秒単位の開始/終了時刻。

必要条件(Claude Code、コンピュータ上)

  • ffmpeg(任意のビルド):brew install ffmpeg / apt install ffmpeg
  • Python 3.9+
  • 1つのバックエンド:
バックエンドインストールデフォルトモデル使用すべきケース
mlxpip install mlx-whispermlx-community/whisper-large-v3-turboApple Silicon。3つの中で最も単語タイミングが正確
faster-whisperpip install faster-whisperlarge-v3-turboLinux/Windows、または CUDA
whisper-cppbrew install whisper-cpp(バイナリは whisper-cli)なし、--model を指定PythonのMLスタックを使いたくない場合

whisper.cpp モデルのダウンロード(466 MB、英語):

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

インストール確認(auto がどのバックエンドを使用するかを表示):

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"

Claude.ai では利用できません(シェルがないため)。その場合は、ユーザーに SRT をアップロードするよう依頼してください。

実行方法

python3 scripts/transcribe.py take.mov                       # 自動バックエンド、英語
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      # 言語を自動検出

まず ffmpeg で16kHzモノラルに抽出するため、任意のコンテナ(mov、mp4、m4a、wav)が使用できます。 出力は --out が指定されない限り入力ファイルの隣に配置されます: <stem>.words.json、<stem>.txt、<stem>.srt。

各ジョブに適したモデル

ジョブ使用するモデル理由
キャプションキューのタイミング、同期ゲートlarge-v3-turbo(mlx または faster-whisper)小規模モデルは同じ音声で単語あたり0.1〜0.4秒ずれる
文字起こしテキスト、カットリスト、リテイク検出small.en または turboテキスト品質はほぼ同等。small.en はCPUで高速
非英語large-v3-turbo に --lang <コード> を指定.en モデルは英語のみ対応

やり直しを防ぐルール

  1. スクリプトのテキストを、Whisperのタイミングに合わせる。 Whisper は固有名詞を聞き間違えます("Cloud" を "Claude" と誤認識など)。キャプションでは、words.json にスクリプトの単語をアラインし、スクリプトのスペルを維持します(edit-style の tools/make_cues.py がこれを行います)。スクリプトにないものについては、修正マップ({"cloud code": "Claude Code"})を保持してください。
  2. スクリプト内の数字は数字として記述する。 Whisper は 2,000 と出力し、「two thousand」とは出力しないため、スペルアウトされたスクリプトではアライメントに失敗します。
  3. 公開するSRTと同期チェックのために、最終レンダリングを再文字起こしする。 生テイクのタイミングは、カット後はすべてずれています。
  4. Whisper は、実際の発話開始が後であっても、最初の単語を 0.00 付近にスタンプする。 頭をトリミングする前に、オーディオのエネルギーから実際の開始点を見つけ、最初の2秒間を再文字起こしして最初の単語が生き残ったことを確認します。
  5. 長いファイル(約30分以上):3つのバックエンドすべてで問題なく動作します。Apple Silicon + turbo ではおよそ実時間/10程度を想定してください。同じマシンで録音中であれば nice -n 15 で実行してください。

障害対応

症状対処方法
no local Whisper foundテーブルから1つのバックエンドをインストールする
whisper-cpp needs --modelggml モデルをダウンロードする(上記)または WHISPER_MODEL を設定する
whisper-cli not found と表示されるがインストールされているWHISPER_BIN=/path/to/whisper-cli を設定する(launchd/cronのPATHには /opt/homebrew/bin が含まれていないことが多い)
空の出力、または単語数0ファイルにオーディオがあるか確認する:ffprobe -v error -select_streams a -show_entries stream=codec_name -of csv=p=0 FILE
間違った言語 / 支離滅裂な出力--lang <コード> を明示的に指定する
単語がくっついて出力される("2,000files")一部のビルドでの whisper.cpp の癖。タイミング作業には mlx または faster-whisper を使用する

報告する出力

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

その後、words.json のパスを次のスキル(edit-style、longform-edit、reel-captions)に渡します。

Individual skills in this repo

This repo contains 11 individual skills — each has its own dedicated page.

jsath/claude-skills

Writes captions for a finished video from its transcript: pulls the line worth repeating, writes first-line options, writes per-platform versions (Instagram, TikTok, YouTube title and description, others on request), keeps the creator's voice using their best past captions, and checks the call to action matches what the video actually says. Use when a creator asks for captions, a caption hook, a YouTube title and description, or a CTA check. Drafts only; never posts or schedules.

jsath/claude-skills

Write CAPTIONS-PLATFORMS.md for one finished short video: a per-platform post caption for Instagram, TikTok, YouTube Shorts (title + description), Facebook, Threads, Bluesky and X, each within that platform's limits, with your comment-keyword CTA on the platforms where it belongs and never on X. Keyword, CTA, platforms, hashtags and limits come from a config file; a checker script fails the file on any miss. Use after an edit is finished, when asked to 'write the captions', 'caption this reel for every platform', or before scheduling.

jsath/claude-skills

Turns one published long-form video or podcast transcript into up to thirty pieces: 10 clips with new hooks and exact timestamps, 8 X posts, 4 LinkedIn posts, 3 carousels, 2 threads, a newsletter, a community post and a blog post, laid out on a two-week plan, all built only from what was said. In Claude Code it also cuts, reframes and captions the clips with ffmpeg. Use when someone wants to repurpose a long video, find clips, or write social posts from a transcript. Never posts or schedules.

jsath/claude-skills

Turn a raw talking-head take into a dynamically edited 1080x1920 reel: full-face, full-graphic and split layouts that switch every 2 to 5 seconds, real UI and official-logo panels, captions on every word timed by Whisper, voice plus synthesised SFX (no music bed) mastered to -14 LUFS, and hard QA gates (caption sync on the final render, A/V length, loudness, colour, framing, contact sheet, claims). Also covers writing the script so it does not read as AI. Use when asked to 'edit this reel', 'make it look edited', 'add captions / dynamic layout / graphics', or 'write a reel script'.

jsath/claude-skills

Edits a raw long-form YouTube recording (screen recording export, camera file, or either plus a separate mic) into a publish-ready video automatically, like Descript on autopilot: transcribes with word timestamps, removes retakes and keeps the last take, tightens dead space while keeping silent on-screen action (speeding up long waits), masters the voice to -14 LUFS / -1.5 dBTP with no music bed, re-transcribes the FINAL render for an every-word SRT (optional burned-in captions), drafts chapters, titles and a description, and fails loudly on QA gates (words, A/V sync, caption sync per chapter, caption coverage, loudness) plus contact sheets you look at. Use when someone says edit this long-form, clean up my recording, cut the retakes and dead space, process the long-form inbox, or descript this. Needs Claude Code with ffmpeg, whisper.cpp and Python 3.

jsath/claude-skills

Turns one podcast episode transcript into a week of written content: an Episode Prep agent that checks the transcript and speaker names, a Clip Spotter that picks the best short-clip moments with exact timestamps and hooks for an editor to cut, a Show Notes Writer that writes show notes and chapter markers, a Repurpose Writer that turns the big ideas into a newsletter, a LinkedIn post and Instagram captions, and an Episode Planner that spreads it all over the week. Works from a transcript the user supplies or exports from their transcription tool. It does not edit audio or video and does not cut clips. Use when a podcaster asks for show notes, chapters, clip timestamps, or posts from an episode, or says \"repurpose this episode\". Drafts only; never posts.

jsath/claude-skills

Turns one raw talking-head take into a finished 1080x1920 vertical reel in Claude Code with free local tools (ffmpeg, whisper.cpp, headless Playwright): transcribes, keeps the last take of repeated lines, cuts pauses, captions every word, adds real screenshots and official logos, and runs measured QA gates. Use when someone wants a raw phone take edited into a Reel, TikTok or Short, retakes and silences cut, word-by-word captions, or a finished video checked. In Claude.ai it only produces a cut list, shot plan and .srt from a pasted transcript.

jsath/claude-skills

Turns notes, voice-note transcripts and half ideas into Reel, TikTok and YouTube scripts in the creator's own voice: ranks an idea bank, writes ten hooks per idea, writes the script at the right length, rewrites anything that sounds like AI using transcripts of the creator's past videos, and fact-checks every claim with a source and date. Use when someone wants a video script, hooks, a ranked list of what to film, a voice pass, a claims check, or a record sheet to read from while filming.

jsath/claude-skills

Reviews and rewrites a video script (YouTube long-form, a short, or a talking-head reel) so it sounds like one person talking to one friend and holds attention: kills forced analogies and presenter phrases, fixes framing, checks hooks, open loops and re-engagement beats, and suggests titles. Use when someone says fix this script, polish my script, make it sound like me, tighten this before I film, or asks for a hook or title for a video. Returns the rewritten script plus a short change log.

jsath/claude-skills

Make a 1280x720 YouTube thumbnail (or a banner/cover) that reads at phone size: a text-free background plate (generated or from a real frame), a real cutout of the person, 1 to 3 words in tight colour blocks, an official logo, composed by a script that checks overlaps and frame edges and renders the 320px and 168px views you must look at. Use when asked for a thumbnail, cover, banner, 'make this clickable', or to fix a thumbnail that looks cluttered or small.

jsath/claude-skills

Runs five agents that keep a YouTube channel's titles and descriptions matched to what people search for now: a Channel Reader that pulls the user's own video list and stats with their YouTube Data API key, YouTube Analytics OAuth or a pasted YouTube Studio export, a Niche Watcher that finds what is working right now for similar-size channels from public search results the API returns or the user provides, a Title Writer that drafts titles, descriptions and chapters for new videos, a Back Catalogue agent that picks old videos worth a refresh and drafts new versions, and a Change Tracker that records every change the user makes and compares before and after on matched windows. Use when a creator asks for YouTube SEO, better titles or descriptions, what is working in their niche, a back catalogue refresh, or says \"seo run\". Never invents search volumes or stats and never changes a video; drafts only.

関連スキル