Communitygithub.com

motion-voice

为纸片动画配音并匹配画面节奏。提供三种路径:本地 Qwen3-TTS、自行录音或其它 TTS、以及占位语音。涵盖交付规范、voice.json、字幕与场景节奏。适用于“设置配音”、“重新配音”、“脚本计时”等场景。

motion-voice 是什么?

motion-voice 是一个专为纸片动画设计的 AI 配音技能,它通过三种不同路径(本地 Qwen3-TTS、自有录音或其它 TTS、以及占位语音)生成 narration 文件夹中所需的 voice/final_narrator/<id>.wav(每行脚本对应一个 WAV)和 timing_narrator.js(包含每个单词的起始和结束时间),然后自动构建字幕和场景计划。该技能支持在 Claude Code、Codex 等 AI 编码代理上运行,只需一个已初始化的 motion-build 项目(包含 narration/script.json 和 video/episode.json)即可使用。用户可根据自身需求选择路径:Path A 利用本地部署的 Qwen3-TTS 模型进行语音合成;Path B 允许用户提供自己的录音或第三方 TTS 输出,通过 ASR 后端进行自动语音识别和音调处理;Path C 则使用 ffmpeg 或 macOS 的 say 命令生成占位语音,以便先完成画面编排再重新配音。技能还提供了精细的交付规则(呼吸停顿、重音强调、语调风格等)和自动字幕生成工具,最终输出供 motion-build 后续步骤(场景、音效、渲染)使用的 plan.json 和 STORYBOARD.md。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/boytegar/motion-skills/tree/HEAD/skills/motion-voice

在你喜欢的 AI 中提问

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

文档

Papercut 配音

每一个后期阶段都需要在 narration 文件夹中准备两个东西:voice/final_narrator/<id>.wav(每个脚本行一个 WAV)和 timing_narrator.js(每个单词的起始和结束时间)。本技能通过三种路径之一生成它们,然后构建字幕和场景计划。完整脚本参考请见 $MOTION_LIB/core/voice/README.md。

前置检查

  • 库:$MOTION_LIB,否则检查 ~/.config/motion-explainer/config.env 中的 MOTION_LIB= 行,再询问一次。将其导出,并运行 . "$MOTION_LIB/env.sh" 以加载 ASR_PY、QWEN_TTS_PY 及其他配置值到 shell 中。
  • 一个已初始化的项目(motion-build,步骤 1),包含 narration/script.json 和包含 scenes 的 video/episode.json。new_episode.sh 会将 build_timing.py 复制到 narration/ 中。
  • 如果用户已经安装了 TTS,则直接使用现有 TTS,无需重新构建(如果是 Qwen3-TTS 则走路径 A,否则走路径 B)。询问一次用户使用的 TTS 是哪个以及在哪里运行。否则询问用户选择哪条路径,并说明所需条件:
路径需要安装模式
A. 本地 Qwen3-TTS来自 $MOTION_LIB/core/voice/setup_tts.sh 的语音 venv(模型下载 2.3-4.2 GB)完整
B. 自行录音或其他 TTS一个 ASR 后端(mlx-whisper 或 faster-whisper)以及 ASR_PY 和 QWEN_TTS_PY 所指向的 Python 环境中的 librosa + numpy(用于音调处理)完整,或手动安装这些包
C. 占位语音ffmpeg;macOS 系统需要 --say 参数标准

如果路径需要的组件超出当前安装范围,请运行 ./install.sh --doctor 并交由 motion-setup 处理。如果没有 ASR,build_timing.py 只能按 2.75 词/秒估算,因此字幕会与实际音频产生偏移。

路径 A:本地 Qwen3-TTS

在系列文件夹中执行:

cp $MOTION_LIB/core/voice/voice.example.json voice/voice.json     # 每个系列执行一次;编辑它
$MOTION_LIB/core/voice/narrate.sh voice/voice.json episodes/NN-slug/narration
$MOTION_LIB/core/voice/finalize.sh voice/voice.json episodes/NN-slug/narration episodes/NN-slug/narration/voice/takes/narrator [num.json]
  • voice.json:包含 speaker(CustomVoice:Aiden, Dylan, Eric, Ryan, Serena, Vivian, Sohee, Ono_anna, Uncle_fu)和 instruct。推荐设置:CustomVoice 1.7B,选择 Ryan 或 Aiden,instruct 为 "friendly, natural, conversational, like telling a friend; clear pauses between sentences; stress the key word of each line"。takes_per_line 默认为 3。tempo 保持为 1.0(其他值需要 rubberband)。qa_targets 设置音调范围和 ASR 匹配度(0.9)。
  • 脚本行可以携带 tts(用于发音的改写文本;字幕保持 text)及其自身的 instruct。num.json 将数字映射为口语单词(如 {"13,000": "thirteen thousand"}),以防止 ASR 匹配因数字而失败。
  • 一次只运行一个 TTS 进程;1.7B 模型非常耗内存。
  • finalize.sh 对每个 take 运行 ASR 和音调处理,为每行挑选一个 take,进行修剪、响度标准化至 -16 LUFS,再对最终结果运行 ASR,并写入 timing_narrator.js。试听后,将修正内容放入 voice/picks_override.json(如 {"l3_name": 2}),然后使用 SKIP_PICK=1 重新运行。
  • 语音设计(用文字描述语音)是 Qwen3-TTS 的一种模式,narrate.py 不驱动该模式。请在其他地方生成后,通过路径 B 使用。

路径 B:自行录音或其他 TTS

  • 将每行对应的一个 WAV 文件放入 voice/final_narrator/<id>.wav,或者将原始 take 放入 voice/takes/narrator/<id>_<k>.wav 并像路径 A 那样运行 finalize.sh。
  • 对于已完成的台词,进行转写,写入 voice/chosen_narrator.json 为 {id: "voice/final_narrator/<id>.wav"},然后在 narration/ 目录下执行:
$ASR_PY $MOTION_LIB/core/voice/asr.py voice/final_narrator/*.wav > voice/asr_narrator_final.json
CHOSEN=voice/chosen_narrator.json TIMING_OUT=timing_narrator.js python3 build_timing.py voice/asr_narrator_final.json

路径 C:占位语音

在 narration/ 文件夹中执行:

python3 $MOTION_LIB/core/tools/placeholder_vo.py [--wps 3.0] [--say [VOICE]]

它会生成静音 WAV 文件(如果使用 --say 参数,则使用 macOS 的 say 命令生成语音)以及仅基于 script.json 生成的 timing_narrator.js,按单词长度分配时间。--wps 3.5 到 4 可接近目标语速(默认 3.0)。可以先构建和计时画面,之后重新配音:替换 WAV 文件,重新运行 finalize.sh,再重新运行 build_vo.py,单词提示会自动更新。

交付规则

配音应该自然、从容且带有强调。观众必须在第一次收听时就理解每一行。

  • 呼吸空间。 在每个句子结尾和列表节拍之间(如 "Fine. Fine. Fine.")要有真实的停顿。以每行之间 0.3-0.4 秒(episode.json 中的 gap,默认 0.22;gaps 可在指定行后添加额外停顿)开始,根据听觉调整。停顿仅放在句子或从句边界:在短语内部插入 0.2 秒的间隙,例如 "copied it, | by taking...",听起来会有滞后感。使用 30 秒的天花板时间来换取空气,而不是减少停顿,且永远不要为了凑时间而放慢语速。
  • 重音强调。 每行所强调的一两个词(数字、转折词、评判词)来自脚本的分镜表。将它们作为每行的 instruct 传入。
  • 语调。 交谈感且略带趣味,而不是播音员的能量。问句听起来像真正的疑问,重点句听起来充满好奇,CTA 要温暖。旁白者仍然不搞笑;画面负责搞笑。
  • 克隆模型(无指令)。 对于克隆语音(ref_audio + ref_text,Base 模型),可调节的杠杆是文本和 take。将停顿写入标点符号(列表节拍之间使用句号,简短问句自成一句)。生成一个连续 take 的多个种子(SEED_BASE、takes_per_line),选择在目标词上音调变化最大且 ASR 达到 0.9 或更好的那个,然后单独重新录制一个平淡的行(ONLY=l4_peak)并在句子边界处拼接。仅克隆你有权使用的语音。
  • 一次性生成整个脚本 能获得一致的韵律:生成一个 take,用 split_take.py 按行切割,然后在 episode.json 中设置 "gap": 0。如果用户偏好,按场景生成也可以。
  • 在全量运行前,向用户播放前三行:使用 ONLY=l1_hook,l2_...,l3_... narrate.sh ...。

字幕与计时

在 video/ 目录下,一旦 episode.json 包含 scenes:

python3 $MOTION_LIB/core/tools/build_vo.py     # public/vo/voiceover.wav, public/vo/captions.json, src/plan.json
python3 $MOTION_LIB/core/tools/timing_md.py    # STORYBOARD.md 的“计时”部分

captions.json 是一个 Remotion Caption[];场景边界来自单词时间戳;组合长度为 plan.json 中的 durationInFrames。build_vo.py 会标记任何时长不足 1.2 秒的场景。如果没有库,可以使用 Remotion 字幕技能(whisper.cpp)或任何能返回单词时间戳的语音转文字工具来转写 WAV。

字幕采用每个单词一个撕裂标签,每页 1-3 个单词,语速为 3.5-4 词/秒($MOTION_LIB/style/$MOTION_STYLE/docs/style-guide.md,第 11 和 13 节)。

交接

接下来的步骤是 motion-build(存根、场景、音效、渲染)。它会读取 src/plan.json 和 video/STORYBOARD.md 的“计时”部分。任何后续的语音变更只需重新运行 build_vo.py 和 timing_md.py;场景缓存会重新渲染所有内容。

Individual skills in this repo

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

bang-motion

Render a reel in the Bang Motion style: high-end cinematic motion graphics with a multi-layer glowing-horizon background, floating colour-mesh blobs, living film grain, frosted-glass UI cards, editorial kinetic typography, a breathing camera, and anti-PPT pacing. Use when the user says cinematic motion graphic, promo opener, product launch reel, kinetic typography, SaaS product tour, glassmorphic UI, anti-slides, or asks for a video that moves like footage instead of a deck. Gunakan skill ini setiap kali user meminta "video promo", "opener", "intro animasi", "motion graphic", "bumper", "kinetic typography", "animasi teks sinematik", "explainer", "video penjelasan" (jurnalisme visual, kartun edukasi, kolase), atau menunjukkan referensi video promosi/explainer dan ingin dibuatkan versi web-nya — bahkan bila mereka tidak menyebut kata "motion graphic" secara eksplisit. Juga gunakan bila user mengeluh hasil animasi web "seperti PPT/presentasi" dan ingin lebih sinematik, atau ingin meren...

isometric

Render a reel in the Isometric style: calm precise product line art in 2:1 dimetric isometric on a white or dark ground, drawn only with constant 2px hairlines, white-filled faces so nearer objects hide farther lines, rounded slabs with visible thickness, stacked layers, repeated-part grids, and one tiny dark accent per frame. Use when the user says isometric, product line art, technical illustration, exploded hardware view, or asks for a clean documentation-grade diagram look.

motion-build

Build and render a papercut episode from a storyboard with the library. Scaffolds the project, builds scenes with parallel agents, assets and audio, renders the mp4, then harvests reusables. Use for "build the reel", "scaffold an episode", "rebuild scene 4", "render it".

motion-explainer

Make a papercut reel, video or explainer end to end. Short vertical (9:16) cut-paper explainers from a link (repo, product page, announcement), idea to mp4. Also routes partial asks to the stage skills and hands out the style prompt for other tools.

motion-qa

Check a papercut reel's stills against the style DNA and the storyboard. Renders contact sheets at a few timestamps, runs the full checklist, then writes the delivery summary. Use for "QA the reel", "check my scenes look like paper", "is this ready to post".

motion-script

Turn a link into a papercut reel script. Researches a sourced facts list, writes the 75-95 word script on the 10-beat spine, a banner fact track, a staging table with one set per banner, and the humour pass. Use for "write the script", "research this repo for a reel".

motion-storyboard

Storyboard a papercut script before any code. Writes the Camera / Cut table, one block per scene with frame-level events on each stressed word, the SFX plan and the proof beat. Use for "storyboard this script" or "plan the camera moves and cuts".

papercut

Render a reel in the Papercut style: layered construction paper brought to life with paper grain, torn edges, stacked shade strips, drop shadows, rigid cut-out animation, a slow camera push, taped headline banners and word-by-word torn-tag captions. Use when the user says cut paper, papercraft, paper cutout, paper collage, construction paper, or asks for the default handcrafted explainer look.

相关技能