1实现原理 · 为什么它能做到
把 HyperFrames 定为中文旁白视频的唯一生产面(不止教学视频),并明令不走旧的 web-video-presentation 路线,除非用户明确要点击驱动的网页演示。
Use HyperFrames as the primary production surface for Chinese narrated videos, not only teaching videos. … Do not use the old Web Video Engineer / `web-video-presentation` implementation path unless the user explicitly asks for a click-driven webpage presentation.
默认视觉与语气:Apple Keynote / macOS 风、口语化,且禁止公式化开场(如 AI 时代,别再…)与对观众露出的内部标签(s03、文件夹名)。
Use Apple Keynote / macOS style unless the user gives a stronger reference … Avoid starting with formulaic lines like "AI 时代,别再...".
先写旁白再动画,且写稿唯一参考是 references/CODE-GARDEN-VOICEOVER.md;开写前先在 DESIGN.md 写一句定位句。
For narration drafting or rewriting, read `references/CODE-GARDEN-VOICEOVER.md` first. … Before writing the script, write a one-sentence **positioning statement** in `DESIGN.md`
单一 sync manifest 作真相源:旁白、字幕、场景起点都从它派生,而不是手维护三份数组。
Keep one sync manifest as the source of truth for narration, subtitles, and scene starts.
TTS 有具体默认值:Doubao/Volcano seed-tts-2.0 + zh_male_liufei_uranus_bigtts + speech_rate=20;Edge TTS 作备选并给男女音色与 +20% 语速建议。
In `/Users/d2/project/web vidio` projects, default to Doubao / Volcano `seed-tts-2.0`, voice `zh_male_liufei_uranus_bigtts`, and `speech_rate=20` unless the user says otherwise. … Recommended Edge TTS defaults for Chinese: voice `zh-CN-YunxiNeural` for a male presenter voice, or `zh-CN-XiaoxiaoNeural` for a female presenter voice; rate `+20%` unless the user requests a slower or faster delivery.
时长必须来自实测音频:有音频文件时禁止用字数、Edge TTS 词边界元数据或旁白文本估算,并要求 ffprobe 复核后回填时长与 cue 时机。
Do not estimate timing from character count, Edge TTS word-boundary metadata, or narration text alone when audio files exist.
字幕规格具体到像素与行数:约 66-72px 中文、强对比或阴影、默认居中底部纯文字(无「旁白」标签、无大底板)、可见字幕保持单行。
Keep visible subtitles to one line. … Use roughly 66-72px Chinese text for burned-in HyperFrames subtitles, strong contrast or shadow, and enough bottom margin to avoid covering the scene focus.
HyperFrames 实现契约照抄生态约定:根元素带 data-duration、audio 用真实 <audio> 元素、在 window.__timelines 注册暂停的 GSAP 时间线、确定性动画、默认柔和交叉淡化转场。
Register a paused GSAP timeline in `window.__timelines` and build deterministic animation.
验证只看真实产物:npm run check(或 hyperframes lint/inspect)、渲染 MP4 后 ffprobe 查真实时长、ffmpeg 抽接触表逐项目视。
ffprobe -v error -show_entries format=duration,size -of json renders/final.mp4
发布草稿有安全阀:可以用真实浏览器准备草稿并核对字段,但在用户确认平台/账号/标题文案/标签/MP4/封面之前不点最终发布。
When using a live browser to upload to social platforms, prepare drafts and verify fields, but do not click the final publish/submit button until the user confirms
2核心能力
3外部依赖
| Kind | Dependency / Endpoint |
|---|---|
| cli | HyperFrames CLI(lint / inspect;渲染经项目 npm run render 或 npx hyperframes) |
| cli | ffprobe / ffmpeg(真实时长核对、抽接触表) |
| api | Doubao / Volcano 语音合成(seed-tts-2.0,需凭证;本 skill 未自带客户端,走项目 TTS 脚本) |
| cli | Edge TTS(免豆包 key,但需网络与 edge-tts CLI/Python 包) |
| network | 社交平台网页(用真实浏览器准备发布草稿,需用户确认后才提交) |
| reference | 口播写作参考(随包分发):references/CODE-GARDEN-VOICEOVER.md |
4管控建议与判定依据
- scripts/: 执行本地脚本或命令: (本 skill 目录内无脚本、无模板、无可执行代码)
- 网络端点: 声明外部网络访问: 语音合成:Doubao / Volcano TTS(凭证由项目 TTS 脚本持有)或 Edge TTS(必须联网,免豆包 key)
- 本地工作目录: 文件读写与工件输出: 项目内:DESIGN.md(含定位句与所选 TTS 提供方/音色/语速)、assets/sync-script.json 与由其生成的 narrati
5第二遍独立确认
- [ok] 本 skill 是否夹带脚本/凭证读取(档位下限依据) — find 目录只返回 SKILL.md、references/CODE-GARDEN-VOICEOVER.md、agents/openai.yaml;grep 无 process.env / fetch / curl 调用点。所有外部能力都以「指示」形式出现,由项目侧脚本或宿主 CLI 执行。
- [ok] TTS 外部依赖与凭证是否真实存在(橙档依据) — SKILL.md 原文给出 Doubao/Volcano seed-tts-2.0 + zh_male_liufei_uranus_bigtts + speech_rate=20 的项目默认,并写 'Edge TTS does not require the Doubao API key, but it still needs network access and the `edge-tts` CLI or Python package installed.' 即既确认凭证类后端存在,也确认有免 key 备选。
- [ok] 社交平台动作是否越界(是否会自动发布) — 原文 'When using a live browser to upload to social platforms, prepare drafts and verify fields, but do not click the final publish/submit button until the user confirms the exact platform, account, title/copy/tags, MP4, and cover.' 明确把最终提交留给人工确认,属安全阀而非绕过。
- [discrepancy] 文档里写死的本机路径对其他使用者意味着什么 — [判定:私有前提,非缺陷]SKILL.md 写 'In `/Users/d2/project/web vidio` projects, default to Doubao / Volcano `seed-tts-2.0` …'——该默认值绑定作者本机目录;在别处使用需替换为本地路径/项目约定,否则「默认音色语速」这一段不适用(不是安全风险,但是可见的可移植性问题)。
- [ok] 字幕/时长是否真以实测音频为准(避免估算冒充) — SKILL.md 明写 'Do not estimate timing from character count, Edge TTS word-boundary metadata, or narration text alone when audio files exist.' 并要求对每段或最终音频跑 ffprobe、由真实时长重生成 sync-map.js;缺依赖时要求报阻断而不是静默换提供方或换慢速默认值。
- [ok] 仓库级验证/提交指示是否真在文档中(工程侧影响) — SKILL.md 末尾 'If the target is inside a git repository, inspect the diff, run verification, and commit the task-related changes unless there is no change, no repository, or a real blocker.'——即 skill 会指示 agent 做 git 提交;已在 file_writes 与 risks 中标注,供使用者知情。
6结论
4d726d1ecfb6c878…