Communitygithub.com

akshayDev17/ai-解释视频

合成旁白并为单个视频构建测量时间线。这是“从课程制作解释视频”流程的第四阶段——一次性TTS原语。

ai-解释视频 是什么?

该技能是“从课程制作解释视频”流水线中的第四阶段(共八阶段),作为一个独立的TTS(文本转语音)原语运行:它为单个视频生成音频并构建精确的时间线,然后停止。它不会循环;当某个节拍需要保持时,场景阶段会重新调用它。技能依赖来自先前脚本阶段的JSON文件,并在机器上通过操作系统密钥存储配置Gemini API密钥。它使用`build-audio.mjs`工具将脚本转换为WAV音频文件,并使用`ffprobe`测量每个片段的确切持续时间,生成`narration/<seg>.wav`、`narration.wav`、`timeline.json`和`timeline.js`。关键特性是持续时间为测量值而非估计值,并包含基于文本的缓存机制,允许在措辞调整后零API调用快速重跑。该技能支持多种AI代理平台(如Claude Code、Cursor、Codex),但作为一次性原语设计,而非循环行为。它适用于需要为教程或教育视频生成精确时间音频的开发者和内容创作者。

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

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

制作视频音频——TTS与测量时间线

属于explainer-video-from-coursework流水线——第4阶段(共8阶段)。这是一个 原语:它一次构建音频然后停止。当节拍需要保持时,场景阶段会重新调用它;该技能本身不循环。

流水线的工具和场景宿主位于同级explainer-video-from-coursework技能中:将其作为node ../explainer-video-from-coursework/tools/<tool>.mjs运行,并解析到此技能文件夹中。从项目运行,因此out/临时目录会放置在笔记旁边。

前置条件: 脚本阶段的out/<name>/scripts/<NN>-*.json;在机器上,Gemini密钥存储在操作系统密钥存储中(参见SETUP.md)。

No API key found失败意味着密钥不在操作系统密钥存储中——向用户传达相应的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,并为每个片段打印一个窗口,以[out] …/timeline.json结尾。

  • 持续时间为测量值,而非估计值——每个WAV文件用ffprobe测量;计划中的Min是一个保护边界,此处的真实数字供后续阶段绑定。
  • 缓存基于文本键——narration/<key>.src存储确切的说话文本,因此措辞调整后重新运行不耗费API调用。它不覆盖--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.

相关技能