Communitygithub.com

akshayDev17/ai-explain-video

ナレーションを合成し、1本の動画の測定済みタイムラインを構築します。explainer-video-from-coursework のステージ4 — ワンショットTTSプリミティブです。

ai-explain-video とは?

このスキルは、コース教材から説明動画を生成するパイプラインの第4ステージであり、テキスト音声合成(TTS)と動画の測定済みタイムラインの構築を担当します。入力としてスクリプトJSONを受け取り、Gemini APIを使用して音声ファイル(WAV)を生成し、各セグメントの実際の長さをffprobeで測定してタイムラインJSONとJavaScriptファイルを出力します。パイプライン全体の一部であり、単一の動画に対して1回だけ実行されるプリミティブですが、後のステージ(シーンステージ)が必要に応じて再呼び出しします。キャッシュ機構により、テキストが同じ場合はAPIコールを節約できますが、音声モデルやスタイルの変更はキャッシュ対象外です。このスキルはネットワークを利用する唯一のステージであり、GeminiのTTS APIキーを使用するため、キーがOSのシークレットストアに設定されている必要があります。

対応~Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/akshayDev17/ai-explainer-video/tree/HEAD/skills/craft-video-audio

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

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

ドキュメント

craft-video-audio — TTSと測定済みタイムライン

explainer-video-from-coursework パイプラインの一部 — 8ステージ中4番目。これは プリミティブです。一度オーディオを構築して停止します。シーンステージは、ビートに ホールドが必要な場合にこれを再呼び出しします。このスキル自体はループしません。

パイプラインのツールとシーンホストは、兄弟スキル explainer-video-from-coursework に あります。このスキルのフォルダからの相対パスで node ../explainer-video-from-coursework/tools/<tool>.mjs として実行します。プロジェクトから実行するため、out/ のスクラッチはノートの隣に配置されます。

前提条件: out/<name>/scripts/<NN>-*.json(スクリプトステージから)、 マシン上ではOSシークレットストアにGeminiキーが存在すること(SETUP.md 参照)。

No API key found エラーは、キーがOSシークレットストアにないことを意味します。 ユーザーに該当する SETUP.md の手順を伝え、再実行してください。

node ../explainer-video-from-coursework/tools/build-audio.mjs --script out/<name>/scripts/<NN>-*.json \
                           --out out/<name>/<NN> --voice Aoede

これにより、narration/<seg>.wav、narration.wav、timeline.json、timeline.js が 動画ごとの作業ディレクトリに書き込まれます。これは唯一のネットワークステージです。Gemini TTSキーを使用します。

完了条件: 実行が終了コード 0 で終了し、セグメントごとに1つのウィンドウを表示し、 最後に [out] …/timeline.json と出力すること。

  • 時間は推定ではなく測定されます — 各WAVは ffprobe で測定されます。 計画の Min はガードレールであり、これは後続のステージがバインドする実際の数値です。
  • キャッシュはテキストキー方式です — narration/<key>.src に実際の読み上げテキストを 保存するため、文言を修正した後の再実行ではAPI呼び出しが0回になります。ただし、--voice、 style、--model は対象外です。これらを変更すると、古い音声がそのまま再利用されます。 再合成するには --force を指定してください。

メンテナンス

このファイルを変更する場合、またはユーザーがこのステージの変更を依頼した場合は、 メインの explainer-video-from-coursework スキルの 「ステージ4 — /audio」 セクションも 一致するように調整する必要があることをユーザーに伝え、そのセクション名を回答に含めてください。

Individual skills in this repo

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

akshayDev17/ai-explainer-video

Assemble one video from its segments — render each window silent, concatenate, mux the narration once, and verify. Stage 8 of explainer-video-from-coursework.

akshayDev17/ai-explainer-video

Retitle and curate the videos in an explainer-video plan — write enrichment.json and merge it. Stage 2 of explainer-video-from-coursework; run it alone to retitle an existing plan.

akshayDev17/ai-explainer-video

Decompose a coursework notes directory into an explainer-video plan and prove no content-bearing section is dropped. Stage 1 of explainer-video-from-coursework; run it alone to (re)plan a directory.

akshayDev17/ai-explainer-video

Generate YouTube chapters and English captions for one finished video. Stage 6 of explainer-video-from-coursework.

akshayDev17/ai-explainer-video

Render one scene config over one time window to an MP4 (or a handful of QA stills). Stage 7 of explainer-video-from-coursework — the render primitive.

akshayDev17/ai-explainer-video

Author and iterate the animated visuals for one video's segments. Stage 5 of explainer-video-from-coursework; it re-invokes the audio stage when a beat needs a hold.

akshayDev17/ai-explainer-video

Write and validate the spoken narration for one explainer-video. Stage 3 of explainer-video-from-coursework; run it alone to (re)write a video's script.

akshayDev17/ai-explainer-video

Plan an explainer-video series from a directory of coursework notes — decompose into videos (proving nothing is dropped), retitle and curate, write the narration, synthesize the audio, author the visuals, then render and assemble the finished cut. Use when the user wants to turn structured coursework notes into explainer videos.

関連スキル