AI digital-human talking-head videos from one photo: Renoise MCP generation + 5 editing styles + 48 creator-grade packaging components. Agent skill for Claude Code / Codex / OpenClaw / WorkBuddy …
TypeScript
skill: Style A Xiaolin-style template, misread patching, A/V drift fix
Andyf661a6c047bb
diff --git a/README.md b/README.mdindex 036d838..9acd708 100644--- a/README.md+++ b/README.md@@ -112,7 +112,7 @@ cd digital-human-koubo### 2 · Install the two skills into your agent-The repo contains two skills: `digital-human-koubo` (main) and `finance-explainer` (the engine for Style A, the finance / tech explainer).+The repo contains two skills: `digital-human-koubo` (main) and `finance-explainer` (an optional engine for chart-only finance long-forms; Style A now uses `templates/lin-169` in the main skill).**Claude Code**```bash@@ -225,7 +225,7 @@ Details: [`references/new-avatar.md`](skills/digital-human-koubo/references/new-| Style | Ratio | Length | Best for | Template ||---|---|---|---|---|-| **A** Finance / tech explainer (Xiaolin-style structure) | 16:9 | 3–20 min | events, data, "why…" | `finance-explainer` engine |+| **A** Finance / tech explainer (Xiaolin-style structure) | 16:9 | 3–20 min | events, data, "why…" | `templates/lin-169` (plan.json-driven: text behind presenter, boards + presenter PiP, B-roll, formulas built term by term, worked examples, charts) || **B** Influencer talking head with animated captions | 9:16 | 30–120 s | product picks, sales, opinions | `templates/huazi-916` (data-driven) || **C** Launch breakdown | 16:9 | 30–90 s | new products / models | `templates/reference/launch-169` || **D** Step-by-step tutorial | 16:9 | 3–8 min | "how to…", tool setup | `templates/reference/tutorial-169` |@@ -306,12 +306,15 @@ skills/scripts/ build_tasks · rangedl · assemble · align · check_edit · cutout_videovoicefx/unify · doctor · new_edit · make_assetsmake_cover · cover_first (cover + first frame)+ lin_scenes · lin_subs · lin_sfx · lin_mix (Style A scenes, subtitles, SFX, mix)+ misread_check · patch_words (find mispronunciations, patch one clause, keep lip sync)templates/huazi-916/ 9:16 data-driven talking-head template (edit.json)packaging/ 48-component kit + gallery project+ lin-169/ 16:9 Xiaolin-style explainer template (scenes.json-driven, 13 scene types)reference/ launch-169 · tutorial-169 · multihost-169assets/ style previews · packaging gallery · avatar reference- finance-explainer/ Style A engine (episode.json beat sheet, research helpers)+ finance-explainer/ chart-only finance long-form engine (episode.json beat sheet, research helpers)docs/ README images, GIF previews, posters```@@ -323,6 +326,8 @@ docs/ README images, GIF previews, posters- Grok 9:16 720p is **720×1280** — never stretch it to another ratio.- Expo easing never quite reaches the target (99.9 → rounds to 100) → counters snap to the exact value at the end.- Always mute the presenter video track; doubled audio a few ms apart sounds harsh (comb filtering).+- Concatenating dozens of clips makes the voice drift behind the lips (measured: 0.38 s late by 4:43 over 44 clips) → `assemble.py` pads every clip's audio to its video length and checks audio/video durations match.+- whisper with the script as prompt "corrects" mispronounced words → `misread_check.py` transcribes pause-split clauses without the script; `patch_words.py` replaces just that clause with a voice-clone take stretched to the original length, so lip sync stays intact (don't re-voice the whole film).## Responsible usediff --git a/README.zh-CN.md b/README.zh-CN.mdindex b436b80..38d0029 100644--- a/README.zh-CN.md+++ b/README.zh-CN.md@@ -112,7 +112,7 @@ cd digital-human-koubo### 2 · 把两个 Skill 装进你的 Agent-仓库里有两个 Skill:`digital-human-koubo`(主 Skill)和 `finance-explainer`(风格 A「财经 / 科技解说」的引擎)。+仓库里有两个 Skill:`digital-human-koubo`(主 Skill)和 `finance-explainer`(纯图表、不出镜的财经长片引擎,可选;风格 A 默认用主 Skill 里的 `templates/lin-169`)。**Claude Code**```bash@@ -225,7 +225,7 @@ python3 ~/.claude/skills/digital-human-koubo/scripts/make_assets.py| 风格 | 比例 | 时长 | 适合 | 模板 ||---|---|---|---|---|-| **A** 小林式解说(财经 / 科技事件) | 16:9 | 3–20 分钟 | 事件、数据、「为什么」 | `finance-explainer` 引擎 |+| **A** 小林式解说(财经 / 科技事件) | 16:9 | 3–20 分钟 | 事件、数据、「为什么」 | `templates/lin-169`(plan.json 驱动:景深字、题板+主播小窗、B-roll、公式逐项长出、算例、图表) || **B** 网红花字口播 | 9:16 | 30–120 秒 | 安利、带货、种草、吐槽 | `templates/huazi-916`(数据驱动) || **C** 发布解读 | 16:9 | 30–90 秒 | 新品、新模型发布 | `templates/reference/launch-169` || **D** 保姆级教程 | 16:9 | 3–8 分钟 | 几步做出 XX、工具上手 | `templates/reference/tutorial-169` |@@ -306,12 +306,15 @@ skills/scripts/ build_tasks · rangedl · assemble · align · check_edit · cutout_videovoicefx/unify · doctor · new_edit · make_assetsmake_cover · cover_first(封面 + 首帧)+ lin_scenes · lin_subs · lin_sfx · lin_mix(风格 A 分镜、字幕、音效、混音)+ misread_check · patch_words(查念错字、只换错句保口型)templates/huazi-916/ 9:16 数据驱动花字口播模板(edit.json)packaging/ 48 个组件 + 图鉴工程+ lin-169/ 16:9 小林式解说模板(scenes.json 驱动,13 种场景)reference/ launch-169 · tutorial-169 · multihost-169assets/ 风格预览图 · 包装图鉴 · 数字人参考图- finance-explainer/ 风格 A 引擎(episode.json 拍表、检索工具)+ finance-explainer/ 纯图表财经长片引擎(episode.json 拍表、检索工具)docs/ README 用的图片、GIF 预览、封面帧```@@ -323,6 +326,8 @@ docs/ README 用的图片、GIF 预览、封面帧- Grok 9:16 720p 是 **720×1280**,别拉成别的比例。- expo 缓动到不了终点(99.9 四舍五入成 100)→ 计数动画结束时强制落在精确值。- 主播视频轨一定要静音;两条声音差几毫秒叠在一起会刺耳(梳状滤波)。+- 几十段口播直接拼接,声音会一段段累积落后口型(实测 44 段到 4:43 晚 0.38 秒)→ `assemble.py` 拼接前把每段音频补齐到画面长度,并校验音画等长。+- whisper 带原文提示会把念错的字「纠正」回去 → `misread_check.py` 按停顿切句、不带原文转写;念错的用 `patch_words.py` 只换那一句(克隆音拉到原句长度),口型不受影响,不用整片换音色。## 使用红线diff --git a/skills/digital-human-koubo/SKILL.md b/skills/digital-human-koubo/SKILL.mdindex 42c9e8d..e961da9 100644--- a/skills/digital-human-koubo/SKILL.md+++ b/skills/digital-human-koubo/SKILL.md@@ -9,7 +9,7 @@ description: 用固定的数字人形象(白背心数字人 / 用户本人数## 红线- 生成花用户的 Renoise credits:create_tasks 之前先报「段数 · 秒数 · 预估 credits · 余额」,等用户在对话里明确同意。先拍第 1 段给用户确认音色,再批量。重拍也要先报价。-- 成片标「内容由 AI 数字人演绎」;场景、动物片段角上标「AI 生成」。+- 成片标「内容由 AI 数字人演绎」;场景、动物片段、B-roll 角上标「AI 生成」。用户明确要去掉画面标注时照做,但要提醒:公开发布时在平台发布页勾选「AI 生成」声明。- 用户本人的形象(persona.json → other_hosts.me)只用在用户自己的片子里。- 「小林式」只学结构和剪辑手法:不用真实创作者的脸、声音、布景和原句。- 点名评价第三方产品的说法,要有出处或标「网友分析 / 个人体验」。展示素材只用用户自己的作品;带歌词字幕的片子不用。@@ -34,7 +34,7 @@ description: 用固定的数字人形象(白背心数字人 / 用户本人数| 风格 | 比例 | 时长 | 剪辑实现 ||---|---|---|---|-| A 小林式解说 | 16:9 | 3–20 分钟 | finance-explainer skill 的引擎(episode.json 拍表) |+| A 小林式解说 | 16:9 | 3–20 分钟 | `templates/lin-169`(plan.json → scenes.json 驱动:景深字 / 题板+主播小窗 / B-roll / 公式逐项长出 / 算例 / 图表,见 references/lin-style.md) || B 网红花字口播 | 9:16 | 30–120 秒 | `templates/huazi-916`(edit.json 驱动,三档花字) || C 发布解读 | 16:9 | 30–90 秒 | 参考实现 `templates/reference/launch-169` || D 保姆级教程 | 16:9 | 3–8 分钟 | 参考实现 `templates/reference/tutorial-169` |@@ -54,20 +54,34 @@ tasks.json 每 10 个一批 create_tasks → wait_tasks。要进场景(直播download_results 拿链接 → 整理成 `urls.txt`(每行 `<taskId>.<ext> <url>`)→ `python3 scripts/rangedl.py`:每个文件 6 段 Range 并发、断点续传、下完 ffmpeg 解码校验。### 5. 回听 + 抽帧 + 拼接-`python3 scripts/assemble.py script.json ids.json --out 成片_完整版.mp4`(ids.json = {段 id: taskId}):whisper 逐段转写比对文稿、只保留到说完后 0.25 秒、拼接、loudnorm -16。+`python3 scripts/assemble.py script.json ids.json --out 成片_完整版.mp4`(ids.json = {段 id: taskId}):whisper 逐段转写比对文稿、只保留到说完后 0.25 秒、拼接、loudnorm -16。剪辑用 `cut/joined.mov`:拼接前已把每段音频补齐到和画面等长,避免几十段拼下来声音累积落后口型;拼完会打印画面和声音的时长,两者必须一致。改过某段后用 `--rejoin` 只重新拼。- whisper `--prompt 原文` 会让个别段漏掉前半句,用中性提示「以下是普通话的句子。」。外语段按语言转写;日韩阿拉伯语不要加 `-ml 1`(会把多字节字符截断成乱码)。- **每段抽 4 帧看一眼**:Grok 横屏口播偶尔自己烧字幕(提示词写了也挡不住),有就重拍那段。- Grok 有时漏念开头的语气词:没影响意思就按实际口播改字幕,别为这个重拍。-- **念错字(不是漏语气词)要当场修,不能交给用户去听**:先用中性提示和带原文提示各转写一次,排除 whisper 误听。确认真念错了,优先 0 积分修:拿同一角色 15–20 秒干声(拼几段 cut/*.wav)当参照,用 MiMo `mimo-v2.5-tts-voiceclone` 只重配错的那几个字,响度对齐后在停顿处接缝替换(不要加速、不要加混响,否则字会糊),替换后再转写确认。口型差太多时再报价重拍那一段。+- **念错字(不是漏语气词)要当场修,不能交给用户去听**:+ - **查**:`python3 scripts/misread_check.py script.json`,按停顿切句、不带原文逐句转写,列出可疑字。**不能拿带原文提示的转写判断读音**:它会把念错的字纠正回去(「通胀」念成 tōng zhèng,带原文照样判全对)。同音字会误报,可疑处听一下确认。+ - **修(0 积分、保口型)**:`python3 scripts/patch_words.py script.json patch.json --ref <2–3 段干净原声> --synth-only` → 填克隆句时间 → 再跑 → `assemble.py --rejoin`。只把错的那一句换成 MiMo 克隆音,长度拉到和原句一样,切在停顿上。换整句比只换两个字自然。+ - **别整片换音色**:口型跟的是原声,整片换掉会到处对不上;也别先提 OmniHuman 重做口型(全片约 5,000 积分)。+ - 口型实在差太多,再报价重拍那一段。- 开头第一个字最容易被吞或念歪(例:「一个知识点」→「几个知识地点」),写稿时第一段开头别放关键名词,或者先垫一个短词。### 6. 对齐 + 剪辑`python3 scripts/align.py script.json --out <工程>/src/tl.json` 出逐字时间轴,然后按 brief.json 的风格剪:- **B 花字口播**:`bash scripts/new_edit.sh huazi-916 <工程>` → 写 `src/edit.json`(关键词、表情、卡片、作品展示、号召,字段见 references/huazi.md)→ `python3 scripts/check_edit.py <工程>/src` → 抽帧 → 渲染。-- **A 小林式**:`bash ~/.claude/skills/finance-explainer/scripts/setup_engine.sh <工程>`,按那边的拍表和画面语法做;数字人口播片段放进 host.json。+- **A 小林式**:`bash scripts/new_edit.sh lin-169 <工程>`,按 `references/lin-style.md` 做:+ 1. `lin_subs.py` 出字幕(数字用 disp.txt 显示成阿拉伯数字)。+ 2. 写 `plan.json`,示例见 `templates/lin-169/plan.example.json`,时间写「@s07:两千」。+ 3. 跑 `lin_scenes.py --face` 生成 scenes.json,并自动量主播脸的位置给小窗用。+ 4. B-roll 用 Wan 3.0 生成(先报价,每段约 60 积分),景深字段跑 `cutout_video.py` 抠像。+ 5. 渲染。每个场景抽开头和中点两帧检查,重点看小窗有没有挡住内容、有没有空板。+ - 只做纯图表、不出镜的财经长片,仍可用 finance-explainer 的引擎。- **C / D / E**:`bash scripts/new_edit.sh reference/<目录> <工程>`,换 tl.json,按段重写 Scene(templates/reference/README.md)。- **包装(每种风格都做)**:按 `references/packaging-presets.json` 里这个风格的默认包装排——开场 30 秒按 open 顺序、正文保证 stimulus_every_s 秒内有一个新视觉事件、讲到 per_beat 里那类内容就用对应组件、recurring 全片挂着。组件写进 `pack` 数组(字段见 references/packaging.md),手法依据见 references/packaging-playbook.md。用户点名要的手法(「加地图」「开场加预告」「加弹幕」「换成 MrBeast 那种」)在默认基础上加减。用户问「有哪些包装」先发 `assets/packaging/图鉴.jpg`。景深字(文字在人身后)要先跑 `scripts/cutout_video.py` 抠像,见 references/packaging.md。- 声音:数字人视频轨一定 `muted`,人声单独铺一条;多段 Grok 原声用 `python3 scripts/voicefx/unify.py <输出目录> <片段…>` 统一频谱 + 同一个小房间混响(复用旧段时加 `--ref 旧片段目录`,场景/动物片段加 `--scene`)。BGM 压在人声下约 20 dB。+ - **音效**:`python3 scripts/lin_sfx.py <工程>/src/scenes.json --out audio` 按场景自动排音效(earshot 音效库:切画面 whoosh、景深字和结果「碰」、卡片 pop、结论 bell)。音效要高出人声和音乐 8–10 dB,用 `earshot timeline --cues` 复查。+ - **BGM**:用 `earshot rank` 从曲库挑。+ - **混音和导出**:`python3 scripts/lin_mix.py` 做人声链 + BGM 循环避让人声 + 音效,出 −16 LUFS 的 mix.wav;加 `--speed 1.1` 出 1.1 倍成片(BGM 保持原速)。+ - **音画同步**:交付前在开头、中段、结尾各测一处声音偏移,要小于 10 ms。- 抽帧检查一定看过渡的中间帧和零间隔衔接处(上一条的尾巴会盖住下一条)。### 7. 封面 + 首帧(默认做,不用问)@@ -92,6 +106,14 @@ download_results 拿链接 → 整理成 `urls.txt`(每行 `<taskId>.<ext> <ur- references/packaging-playbook.md:头部博主实测结论(节奏、开场公式、字幕、声音、号召、红线),完整报告在 references/research/- references/packaging-presets.json:五种风格各自的默认包装- references/huazi.md:花字模板 edit.json 字段、九种卡片、三档强度、写法习惯+- references/lin-style.md:A 小林式的画面语法、13 种场景、流水线、B-roll 提示词、音效档位、踩过的坑+- scripts:+ - lin_scenes.py:plan.json 转 scenes.json,自动量脸+ - lin_subs.py:字幕+ - lin_sfx.py:earshot 音效+ - lin_mix.py:混音、变速导出+ - misread_check.py:查念错+ - patch_words.py:只换念错的句子,保住口型- persona.json:白背心数字人 + 其他主播(用户本人、橘猫店长、柴犬主播)、提示词模板、动作库、多语言实测- references/voice.md:换声音(MiMo 克隆 / 音色设计)- references/new-avatar.md:从一张照片做新形象diff --git a/skills/digital-human-koubo/references/edit-styles.md b/skills/digital-human-koubo/references/edit-styles.mdindex 75e9149..d2edcd1 100644--- a/skills/digital-human-koubo/references/edit-styles.md+++ b/skills/digital-human-koubo/references/edit-styles.md@@ -8,7 +8,7 @@| C 发布解读 | templates/reference/launch-169 | src/Film.tsx | 新品发布、横屏 B 站 || D 教程 | templates/reference/tutorial-169 | src/Tutorial.tsx | 保姆级教程、操作演示 || E 多主播多语言 | templates/reference/multihost-169 | src/Tutorial.tsx(nar / clip / title / outro) | 能力展示、多场景、出海 |-| A 小林式解说 | finance-explainer skill 的 templates/engine | src/Episode.tsx + episode.json | 财经 / 科技事件解说 |+| A 小林式解说 | templates/lin-169(scripts/new_edit.sh lin-169) | src/Lin.tsx + src/scenes.json(lin_scenes.py 从 plan.json 生成)+ src/cues.json | 财经 / 科技事件解说(纯图表长片仍可用 finance-explainer 引擎) |## 花字口播新片一律用 templates/huazi-916(edit.json 驱动),字段见 references/huazi.md。diff --git a/skills/digital-human-koubo/references/lin-style.md b/skills/digital-human-koubo/references/lin-style.mdnew file mode 100644index 0000000..d155570--- /dev/null+++ b/skills/digital-human-koubo/references/lin-style.md@@ -0,0 +1,91 @@+# A · 小林式解说:剪辑手法与流水线++数据驱动的 Remotion 模板 `templates/lin-169`。第一次实战(2026-10):一期个人理财讲解,44 段口播、5 分 50 秒、42 个场景。模板里的 `plan.example.json` 是一个 6 段的小示例。++**只学结构和剪辑手法**:不用真实创作者的脸、声音、布景、栏目名和原句(见 SKILL.md 红线)。参考片只用来拆节奏。++## 一、画面语法(从参考片逐帧拆出来的)++| 手法 | 什么时候用 | 模板里的场景类型 |+|---|---|---|+| 景深字:金色大字在主播身后 | 开场命题、关键数字、结尾金句。一期 3–4 次 | `host` + `depth` |+| 紫色题板 + 主播小窗 | 提问(「想一想」)、定义、假设、结论 | `board` |+| B-roll 实拍空镜 + 主播圆窗 + 数据卡 | 讲到生活场景、机构、行业时(超市、银行、医院、家庭) | `broll` + card / stat / chips / banner / doc / slam / float |+| 大数字卡 | 两三个利率、比例并排比 | `rates` |+| 先 ?% 后揭晓 | 「重要假设」:先挂问号,念到时翻牌 | `assume` |+| 推导逐行出现 | 列方程 | `formula` |+| 结论砸下 | 一个算式的结果(「72 ÷ 年化」→「≈ 12 年」) | `big` |+| 公式逐项长出 | 多项公式(A + B×C + D),当前讲的那项高亮,下挂 3D 图标 | `formula2`(`final:1` 全亮) |+| 算例填数 | 把例子的数字一个个填进公式,结果砸下 | `calc` |+| 条形图、瀑布图、曲线 | 地区对比、扣费、长期趋势(曲线标「示意」) | `bars` / `fall` / `curve` |+| 3D 贴纸四宫格 | 列出几大项(比如育儿 / 医疗 / 买房 / 养老) | `stickers` |++**节奏**(参考片实测,实战照做):+- 画面每 6–9 秒换一次类型(主播 / 题板 / B-roll 交替)。+- 主播全屏累计不超过全片 20%(实战那期 71 秒 / 350 秒)。+- 每个数字出现时屏幕上必须有它。+- 题板和 B-roll 时主播一直在小窗里。小窗只有四个位置:`circle-tl` / `circle-bl` / `rect-l` / `rect-r`。`rect-r` 时面板自动靠左,不会被挡住(实战时踩过公式最后一项被盖住的坑)。++## 二、流水线(A 风格专用部分,其余同 SKILL.md)++1. **写稿**:同 SKILL.md 第 1 步。数字在稿子里写念法(「百分之二点五」),另写一份 `disp.txt` 显示稿(「2.5%」),每段一行,标点断句数要和念稿一样。+2. **拍 + 拼**:`build_tasks.py` → Grok → `assemble.py`。拼接已经保证音画等长,不用另外处理。+3. **查念错**:`python3 scripts/misread_check.py script.json`。按停顿切句,不带原文逐句转写。+ - 不能信 assemble.py 带原文提示的准确率:它会把念错的字「纠正」回去,比如「通胀」念成 tōng zhèng 照样判 100%。+ - 可疑字要让人听一下确认,同音字会误报。+4. **修念错(0 积分、保口型)**:`patch_words.py script.json patch.json --ref s05,s24,s41 --synth-only` → 填 m → 再跑 → `assemble.py --rejoin`。+ - 只把那一句换成 MiMo 克隆音,长度拉到和原句一样。+ - **不要整片换音色**:口型是跟 Grok 原声走的,整片换完到处对不上,用户一眼看出来。+ - **不要先提 OmniHuman 重做口型**:全片约 5,000 积分,用户明确说没必要。+5. **对齐**:`align.py` → `lin_subs.py script.json --disp disp.txt` → `src/cues.json`。+6. **分镜**:写 `plan.json`(格式见 lin_scenes.py 文件头,时间写「@s07:两千」),跑 `lin_scenes.py plan.json --tl src/tl.json --out src/scenes.json --face`。+ - `--face` 自动量主播脸中心,供小窗裁切用。+ - 报 GAP 就是场景没接上。+7. **素材**:+ - 景深字:`cutout_video.py cut/<段>.mp4 public/cut/<段>.webm`(Vision 抠像,本地)。+ - B-roll:放 `public/broll/B01.mp4…`。+ - 贴纸:放 `public/stickers/`。+8. **声音**:+ - 音效:`lin_sfx.py src/scenes.json --out audio`。+ - 混音:`lin_mix.py --voice cut/joined.mov --bgm 曲子 --sfx audio/sfx_bus.wav --out public/mix.wav`。+9. **渲染 + 导出**:+ - `npx remotion render src/index.ts Lin out/lin.mp4`。+ - 要 1.1 倍:`lin_mix.py ... --speed 1.1 --video out/lin.mp4 --final 成片_1.1x.mp4`(人声、音效、画面一起加速,BGM 原速)。+10. **质检**:+ - 每个场景抽开头 +0.15 秒和中点两帧拼图,看动画中途帧、小窗遮挡、空板。+ - `earshot timeline mix.wav --cues audio/cues_earshot.json` 看音效有没有被埋。+ - 成片和源片在开头、中段、结尾各取一处,对声音互相关、对画面帧匹配:声音 <10 ms、画面 ±1 帧。++## 三、B-roll(Renoise,花积分前先报价)++- **模型**:Wan 3.0,720p,5 秒,每段 60 积分(账户有限免活动时可能更少)。一期 10–12 段,约 720 积分。+- **提示词公式**:`Cinematic <镜头运动> of <具体场景+人物动作>, <光线>, shallow depth of field, documentary B-roll. No readable text, no logos, no watermark.`+ - 写中国场景(Chinese city street / red yuan banknotes)。+ - 人物写普通路人,不写名人。+- **角标**:画面角上自动加「AI 生成画面」(config.brollTag,设成 "" 可关)。+- **时长**:场景比 5 秒长时自动放慢到最低 0.55 倍,再加 1.02→1.12 慢推。场景超过 9 秒就拆成两个 B-roll 或插一块题板。+- **贴纸**:GPT Image 2.5 一张 2×2 四宫格(2k,23 积分),本地切成四张、从四角洪泛去掉白底,放 `public/stickers/sticker_0..3.png`。++## 四、声音++- **音效库**:earshot(可选,`EARSHOT_PY` 指向它的 python);没装时 lin_sfx.py 用工程 `public/sfx`(make_assets.py 合成)兜底。+ - lin_sfx.py 首次会 `kit init --preset calm`,再把 drop 改成 cut_hit/punch(「碰」)、pop 改成 ui_pop/soft。+ - 规则表见脚本文件头。一期约 120 个音效。+- **音量**:要高出背景(人声 + 音乐)8–10 dB 才听得清。+ - 第一版只高 5 dB,用户说「碰」听不到。+ - 现在的档位:drop / bell +7 dB、pop / land +3 dB、whoosh −2 dB。+ - 复查用 `earshot timeline` 的 event_prominence_db。+- **BGM**:`earshot rank "<描述>" <曲库目录> --top 6` 挑曲。+ - 首次要拉模型,10 分钟以上,放后台跑。+ - 财经讲解选 light jazz / lo-fi(实战用的是 Mixkit「Upbeat Jazz」,免费可商用)。+ - 循环、sidechain 让人声、结尾淡出都由 lin_mix.py 做。+- **人声**:女声链 220 Hz +1.5 / 420 Hz −2 / 3.2 kHz +2 / 10 kHz +1.5 / 去齿音 / 3:1 压缩。总线 limiter,整片 −16 LUFS。++## 五、踩过的坑++- **拼接音画漂移**:44 段直接 `concat -c copy` 再解码音频,到 4:43 声音落后口型 0.38 秒(用户发现)。assemble.py 已修:每段音频 pad/trim 到画面帧长,keep 写真实画面长度。+- **带原文提示的转写会掩盖念错**:见第二节第 3 步。+- **只换两个字**:接缝处转写成别的词(「城镇」→「承认」)。换整句、切在停顿上才自然。+- **小窗挡内容**:`rect-r` 盖住公式最后一项。模板已让面板自动避开小窗。改布局后抽中点帧看一眼。+- **Remotion 循环里用 hook**:图表的每一行要单独拆成组件(FallBar / BarRow / Term),别在 map 里调 useK。+- **右上角 AI 标注**:默认显示「内容由 AI 数字人演绎」。用户要去掉时设 `config.disclosure: ""`,并提醒发布时在平台上勾选 AI 生成声明。diff --git a/skills/digital-human-koubo/references/style-menu.md b/skills/digital-human-koubo/references/style-menu.mdindex f2b428d..0734862 100644--- a/skills/digital-human-koubo/references/style-menu.md+++ b/skills/digital-human-koubo/references/style-menu.md@@ -41,12 +41,13 @@### A · 小林式解说(财经 / 科技事件)- **适合**:一件事讲清楚——暴雷、收购、行业格局、「为什么 XX」。3–20 分钟。-- **画面**:主播全屏 ↔ 缩成小窗、旁边上图表 / 文件标黄 / 时间线 / 竞猜;章节标题卡;拟人贴纸独白。每分钟 9–12 次画面切换,主播全屏一次不超过 12 秒。+- **画面**:主播全屏 ↔ 缩成小窗、旁边上图表 / 文件标黄 / 时间线 / 竞猜;章节标题卡;拟人贴纸独白。每分钟 9–12 次画面切换,主播全屏一次不超过 12 秒,累计不超过全片 20%。+- **13 种场景**(templates/lin-169):景深字、紫色题板+主播小窗、B-roll+数据卡/标签/大数字/横幅、利率大卡、先 ?% 后揭晓、推导逐行、结论砸下、公式逐项长出、算例填数、条形图/瀑布/曲线、3D 贴纸四宫格。详见 references/lin-style.md。- **稿子**:三种骨架(危机型 / 博弈型 / 悖论型),每分钟 1–2 个设问、3–4 个带参照物的数字;至少 3 个活人感手法(替观众质疑、生活比喻、坦白没查到、先说答案…)。-- **怎么做**:走 `finance-explainer` skill 的流程和引擎(`~/.claude/skills/finance-explainer`,episode.json 拍表驱动);主播用本 skill 的数字人,口播段按 15 秒切。+- **怎么做**:`bash scripts/new_edit.sh lin-169 <工程>`,写 plan.json(时间写「@段号:触发词」)→ `lin_scenes.py` → 渲染。B-roll 用 Wan 3.0 生成(720p 5 秒 60 积分/段,一期 10–12 段)。音效用 `lin_sfx.py`(earshot),混音用 `lin_mix.py`。流程见 references/lin-style.md。纯图表、不出镜的长片仍可走 `finance-explainer` 的引擎。- **红线**:只学结构和手法,不用小Lin本人的脸、声音、布景、口头禅原句;每个数字进 facts.md 带出处。- **默认包装**:开场砸字/搜索框 → 证据截图 → 主问题 → 第一章;全片进度条 + 出处角标 + 每章复盘板;数字用 Counter、原文用 DocFocus、地点用 MapRoute、揭晓前 PollPop。-- **成本**:小窗段多(约 60%)→ 大量 480p,比同长度的全屏口播便宜约三成。+- **成本**:口播全部按 720p 拍(小窗里有方形大窗时 480p 会糊),5–6 分钟约 6,000 积分;B-roll 约 720 积分、贴纸 23 积分。剪辑、修念错、音效都是本地做,0 积分。### B · 网红花字口播(竖屏)diff --git a/skills/digital-human-koubo/scripts/assemble.py b/skills/digital-human-koubo/scripts/assemble.pyindex 0ced833..8792c69 100644--- a/skills/digital-human-koubo/scripts/assemble.py+++ b/skills/digital-human-koubo/scripts/assemble.py@@ -4,7 +4,9 @@- script.json:[{"id","t",...}](和 build_tasks.py 同一份);ids.json:{"s1": 363509, ...}(段 id → Renoise taskId);下载的文件在 gen/renoise-<taskId>.mp4- 每段:whisper 转写(中性提示,不用 --prompt 原文,免得漏前半句)→ 和文稿比准确率 → 只保留到说完后 0.25 秒- 输出 cut/<id>.mp4(30fps、48k 立体声)、cut/<id>.json(逐字时间,align.py 用)、cut/qa.json、拼接好的 --out(-16 LUFS)-- 准确率 < 85% 的段打 ⚠,先人工听;真念错就单独重拍那段"""+- 准确率 < 85% 的段打 ⚠,先人工听;真念错就单独重拍那段+- 念错字另用 misread_check.py(不带原文提示逐句转写)查,用 patch_words.py 只换错句;改完 --rejoin 只重新拼接+- 拼接前每段音频补齐/裁到和画面完全等长(PCM .mov 中转),否则几十段拼下来声音会累积落后口型(2026-10 实测 44 段到 4:43 晚 0.38 秒)"""import json, subprocess, difflib, re, os, sysfrom pathlib import Patha = sys.argv[1:]@@ -12,10 +14,11 @@ if len(a) < 2: sys.exit(__doc__)S = json.load(open(a[0])); IDS = json.load(open(a[1]))opt = lambda k, d: a[a.index(k) + 1] if k in a else dout_name, lang, size = opt('--out', '成片_完整版.mp4'), opt('--lang', 'zh'), opt('--size', '')+REJOIN = '--rejoin' in aWM = os.environ.get('WHISPER_MODEL') or next((p for p in map(os.path.expanduser, ['~/Library/Application Support/Murmur/models/ggml-medium-q5_0.bin', '~/models/ggml-medium-q5_0.bin', '~/.cache/whisper/ggml-medium-q5_0.bin', '~/models/ggml-medium.bin']) if os.path.exists(p)), '~/models/ggml-medium-q5_0.bin')clean = lambda s: re.sub(r'[\s,。、:;!?,.:;!?“”]', '', s).lower()Path('cut').mkdir(exist_ok=True); rep = []-for s in S:+for s in ([] if REJOIN else S):sid = s['id']; src = f"gen/renoise-{IDS[sid]}.mp4"; wav = f'cut/{sid}.wav'lg = s.get('lang_code', lang)subprocess.run(['ffmpeg', '-loglevel', 'error', '-y', '-i', src, '-ar', '16000', '-ac', '1', wav], check=True)@@ -33,8 +36,22 @@ for s in S:'-af', f'aresample=48000,afade=t=out:st={max(0, keep - 0.12):.3f}:d=0.12', '-ac', '2', '-c:v', 'libx264', '-crf', '17', '-preset', 'medium', '-c:a', 'aac', '-b:a', '192k', f'cut/{sid}.mp4'], check=True)rep.append(dict(id=sid, acc=round(acc, 3), speech=[round(st, 2), round(en, 2)], keep=round(keep, 2), src_dur=round(dur, 2), heard=heard))print(f"{'⚠' if acc < 0.85 else ' '}{sid:5s} 准确率 {acc:.0%} 说话 {st:.2f}–{en:.2f}s 保留 {keep:.2f}/{dur:.2f}s 听到:{heard}")+if REJOIN: rep = json.load(open('cut/qa.json'))+else: json.dump(rep, open('cut/qa.json', 'w'), ensure_ascii=False, indent=1)+# 拼接:每段音频 pad/trim 到画面帧数长度(PCM),keep 改成真实画面长度,保证 align.py 的累计时间 = 拼好的画面时间+Path('cut/_join').mkdir(exist_ok=True); Q = {r['id']: r for r in rep}+for s in S:+ f = f"cut/{s['id']}.mp4"+ nfr = int(subprocess.run(['ffprobe', '-v', 'error', '-select_streams', 'v:0', '-count_packets', '-show_entries', 'stream=nb_read_packets', '-of', 'csv=p=0', f], capture_output=True, text=True).stdout.strip())+ vd = nfr / 30+ subprocess.run(['ffmpeg', '-loglevel', 'error', '-y', '-i', f, '-map', '0:v', '-map', '0:a', '-c:v', 'copy', '-af', f'aresample=48000,apad,atrim=0:{vd:.5f}', '-c:a', 'pcm_s16le', f"cut/_join/{s['id']}.mov"], check=True)+ Q[s['id']]['keep'] = round(vd, 5)json.dump(rep, open('cut/qa.json', 'w'), ensure_ascii=False, indent=1)-open('cut/list.txt', 'w').write(''.join(f"file '{s['id']}.mp4'\n" for s in S))-subprocess.run(['ffmpeg', '-loglevel', 'error', '-y', '-f', 'concat', '-safe', '0', '-i', 'cut/list.txt', '-c', 'copy', 'cut/joined.mp4'], check=True)-subprocess.run(['ffmpeg', '-loglevel', 'error', '-y', '-i', 'cut/joined.mp4', '-af', 'loudnorm=I=-16:TP=-1.5:LRA=11', '-c:v', 'copy', '-c:a', 'aac', '-b:a', '192k', '-movflags', '+faststart', out_name], check=True)-print('拼接完成', out_name, round(sum(r['keep'] for r in rep), 2), '秒')+open('cut/list.txt', 'w').write(''.join(f"file '_join/{s['id']}.mov'\n" for s in S))+subprocess.run(['ffmpeg', '-loglevel', 'error', '-y', '-f', 'concat', '-safe', '0', '-i', 'cut/list.txt', '-c:v', 'copy', '-c:a', 'pcm_s16le', 'cut/joined.mov'], check=True)+sd = lambda f, sel: float(subprocess.run(['ffprobe', '-v', 'error', '-select_streams', sel, '-show_entries', 'stream=duration', '-of', 'csv=p=0', f], capture_output=True, text=True).stdout.strip() or 0)+dv, da = sd('cut/joined.mov', 'v:0'), sd('cut/joined.mov', 'a:0')+print(('✓' if abs(dv - da) < 0.02 else '⚠ 音画不等长') + f' 拼接 画面 {dv:.3f}s / 声音 {da:.3f}s')+subprocess.run(['ffmpeg', '-loglevel', 'error', '-y', '-i', 'cut/joined.mov', '-c:v', 'copy', '-c:a', 'aac', '-b:a', '192k', 'cut/joined.mp4'], check=True)+subprocess.run(['ffmpeg', '-loglevel', 'error', '-y', '-i', 'cut/joined.mov', '-af', 'loudnorm=I=-16:TP=-1.5:LRA=11', '-c:v', 'copy', '-c:a', 'aac', '-b:a', '192k', '-movflags', '+faststart', out_name], check=True)+print('拼接完成', out_name, round(sum(r['keep'] for r in rep), 2), '秒(剪辑用 cut/joined.mov / joined.mp4,未做响度)')diff --git a/skills/digital-human-koubo/scripts/face_center.swift b/skills/digital-human-koubo/scripts/face_center.swiftnew file mode 100644index 0000000..d741c0a--- /dev/null+++ b/skills/digital-human-koubo/scripts/face_center.swift@@ -0,0 +1,12 @@+import Foundation+import Vision+import AppKit+// swift face_center.swift frame.png → 打印脸中心(1920×1080 像素坐标,原点左上)+let img = NSImage(contentsOfFile: CommandLine.arguments[1])!+let cg = img.cgImage(forProposedRect: nil, context: nil, hints: nil)!+let req = VNDetectFaceRectanglesRequest()+try! VNImageRequestHandler(cgImage: cg, options: [:]).perform([req])+if let f = req.results?.first {+ let b = f.boundingBox; let W = Double(cg.width), H = Double(cg.height)+ print(String(format: "%.0f %.0f", (b.midX) * W * 1920 / W, (1 - b.midY) * H * 1080 / H))+}diff --git a/skills/digital-human-koubo/scripts/lin_mix.py b/skills/digital-human-koubo/scripts/lin_mix.pynew file mode 100644index 0000000..aee9fe8--- /dev/null+++ b/skills/digital-human-koubo/scripts/lin_mix.py@@ -0,0 +1,42 @@+#!/usr/bin/env python3+"""人声链 + BGM 循环避让 + 音效 → 母带 -16 LUFS;可选变速导出成片。+用法:+ python3 lin_mix.py --voice cut/joined.mov --bgm 曲子.mp3 --sfx audio/sfx_bus.wav --out edit/public/mix.wav [--voice-out edit/public/voice.wav] [--male]+ python3 lin_mix.py ... --speed 1.1 --video edit/out/lin.mp4 --final 成片_1.1x.mp4 # 人声和音效 atempo、画面 setpts,BGM 保持原速只裁长度+- 人声链(女声默认):高通 90 / 220 Hz +1.5 / 420 Hz −2 / 3.2 kHz +2 / 10 kHz +1.5 / 去齿音 / 压缩 3:1 / −17 LUFS;--male 换成 140 Hz +3.5 那条+- BGM:循环(3 秒交叉淡化)到够长,−24 LUFS 打底,sidechain 被人声压(threshold 0.04 ratio 5),结尾 5 秒淡出+- 音效总线 −8 dB;总线 limiter + loudnorm −16 LUFS / −1.5 dBTP+- 不加 --speed 时只出 mix.wav(给 Remotion 的 public/),--video/--final 给了就顺手把 mix 套到渲好的画面上"""+import subprocess, sys, json+a = sys.argv[1:]+if not a: sys.exit(__doc__)+opt = lambda k, d=None: a[a.index(k) + 1] if k in a else d+voice, bgm, sfx, out = opt('--voice'), opt('--bgm'), opt('--sfx'), opt('--out', 'mix.wav')+sp = float(opt('--speed', 1.0)); vout = opt('--voice-out')+dur = lambda f: float(subprocess.run(['ffprobe', '-v', 'error', '-show_entries', 'format=duration', '-of', 'csv=p=0', f], capture_output=True, text=True).stdout)+run = lambda *c: subprocess.run(['ffmpeg', '-v', 'error', '-y', *c], check=True)+chain = ("highpass=f=70,equalizer=f=140:t=o:w=1:g=3.5,equalizer=f=420:t=o:w=1:g=-2,equalizer=f=3200:t=o:w=1:g=3" if '--male' in a else+ "highpass=f=90,equalizer=f=220:t=o:w=1:g=1.5,equalizer=f=420:t=o:w=1:g=-2,equalizer=f=3200:t=o:w=1:g=2,equalizer=f=10000:t=o:w=1:g=1.5,deesser=i=0.35") + \+ ",acompressor=threshold=-22dB:ratio=3:attack=5:release=100:makeup=2,loudnorm=I=-17:TP=-2:LRA=7"+vw = vout or '/tmp/_lin_voice.wav'+run('-i', voice, '-vn', '-af', chain, '-ar', '48000', '-ac', '2', vw)+L = dur(vw) / sp+bl = dur(bgm); n = int(L // max(1, bl - 3)) + 2+ins = sum([['-i', bgm] for _ in range(n)], [])+xf = ''.join(f"[{'a' if i else '0:a'}{i if i else ''}][{i + 1}:a]acrossfade=d=3[a{i + 1}];" for i in range(n - 1)).replace('[a0]', '[0:a]')+run(*ins, '-filter_complex', f"{xf}[a{n - 1}]atrim=0:{L + 1:.2f},afade=t=in:d=1,afade=t=out:st={max(0, L - 5):.2f}:d=5,aresample=48000,loudnorm=I=-24:TP=-3[o]" if n > 1 else f"[0:a]atrim=0:{L + 1:.2f},afade=t=out:st={max(0, L - 5):.2f}:d=5,aresample=48000,loudnorm=I=-24:TP=-3[o]",+ '-map', '[o]', '-ac', '2', '/tmp/_lin_bgm.wav')+tempo = f'atempo={sp},' if sp != 1 else ''+fx = f"[2:a]{tempo}volume=-8dB[fx];" if sfx else ''+mixn = 3 if sfx else 2+run('-i', '/tmp/_lin_bgm.wav', '-i', vw, *(['-i', sfx] if sfx else []), '-filter_complex',+ f"[1:a]{tempo}asplit=2[v][key];[0:a][key]sidechaincompress=threshold=0.04:ratio=5:attack=30:release=400:makeup=1[bg];{fx}"+ f"[v][bg]{'[fx]' if sfx else ''}amix=inputs={mixn}:normalize=0:duration=first,alimiter=limit=0.89:level=false,loudnorm=I=-16:TP=-1.5:LRA=9[m]",+ '-map', '[m]', '-ar', '48000', out)+print('mix', out, round(dur(out), 2), 's')+if opt('--video') and opt('--final'):+ if sp != 1:+ run('-i', opt('--video'), '-i', out, '-filter_complex', f'[0:v]setpts=PTS/{sp},fps=30[v]', '-map', '[v]', '-map', '1:a', '-c:v', 'libx264', '-crf', '18', '-preset', 'medium', '-c:a', 'aac', '-b:a', '256k', '-shortest', '-movflags', '+faststart', opt('--final'))+ else:+ run('-i', opt('--video'), '-i', out, '-map', '0:v', '-map', '1:a', '-c:v', 'copy', '-c:a', 'aac', '-b:a', '256k', '-shortest', '-movflags', '+faststart', opt('--final'))+ print('成片', opt('--final'), round(dur(opt('--final')), 2), 's')diff --git a/skills/digital-human-koubo/scripts/lin_scenes.py b/skills/digital-human-koubo/scripts/lin_scenes.pynew file mode 100644index 0000000..f787cbc--- /dev/null+++ b/skills/digital-human-koubo/scripts/lin_scenes.py@@ -0,0 +1,57 @@+#!/usr/bin/env python3+"""小林式剪辑:把人写的分镜 plan.json 换成 Lin.tsx 用的 scenes.json(整片绝对秒)。+用法:python3 lin_scenes.py plan.json --tl <工程>/src/tl.json --out <工程>/src/scenes.json+plan.json = {"config": {...可选:face/audio/disclosure/brollTag/colors}, "scenes": [{"type": ..., "a": "@s01", "b": "@s01:有人说", ...}, ...]}+时间写法(任何字段、任何嵌套里以 @ 开头的字符串都会被换成秒):+ "@s07" s07 这段开头+ "@s07:end" s07 这段结尾+ "@s07:两千" s07 里第一次出现「两千」那个字的时间(tl.json 逐字时间,按 script.json 的念法写,别写阿拉伯数字)+ "@s07:两千|-0.2" 再提前 0.2 秒(| 后面是偏移秒数)+检查:相邻场景不衔接(>0.05 秒空隙)会报 GAP;broll 默认 circle-bl 小窗。+--face:从 public/main.mp4 第 3 秒量主播脸中心,写进 config.face(换形象/机位后跑一次)。"""+import json, sys, re+from pathlib import Path+a = sys.argv[1:]+if not a: sys.exit(__doc__)+opt = lambda k, d=None: a[a.index(k) + 1] if k in a else d+plan = json.load(open(a[0])); tl = json.load(open(opt('--tl', 'src/tl.json'))); S = {s['id']: s for s in tl['segs']}++def at(ref):+ m = re.match(r'^@(s\d+)(?::([^|]+))?(?:\|([-+]?\d*\.?\d+))?$', ref)+ if not m: raise SystemExit(f'看不懂的时间写法:{ref}')+ sid, trig, off = m.group(1), m.group(2), float(m.group(3) or 0)+ if sid not in S: raise SystemExit(f'{ref}:tl.json 里没有 {sid}')+ s = S[sid]+ if not trig: t = s['start']+ elif trig == 'end': t = s['end']+ else:+ i = s['text'].find(trig)+ if i < 0: raise SystemExit(f'{ref}:{sid} 的稿子里找不到「{trig}」(稿子:{s["text"]})')+ ch = {int(k): v for k, v in s['chars'].items()}; ks = [k for k in ch if k >= i]+ t = ch[min(ks)] if ks else s['start']+ return round(t + off, 3)++def walk(x):+ if isinstance(x, str) and x.startswith('@'): return at(x)+ if isinstance(x, list): return [walk(v) for v in x]+ if isinstance(x, dict): return {k: walk(v) for k, v in x.items()}+ return x++scenes = [walk(s) for s in plan['scenes']]+for s in scenes:+ if s['type'] == 'broll': s.setdefault('pip', 'circle-bl')+bad = 0+for x, y in zip(scenes, scenes[1:]):+ if abs(x['b'] - y['a']) > 0.05: print(f"GAP {x['type']} 结束 {x['b']} → {y['type']} 开始 {y['a']}"); bad += 1+cfg = plan.get('config', {})+if '--face' in a:+ import subprocess, tempfile, os+ root = Path(opt('--out', 'src/scenes.json')).resolve().parent.parent+ sw = Path(__file__).with_name('face_center.swift')+ png = tempfile.mktemp(suffix='.png')+ subprocess.run(['ffmpeg', '-v', 'error', '-y', '-ss', '3', '-i', str(root / 'public/main.mp4'), '-frames:v', '1', '-vf', 'scale=1920:1080', png], check=True)+ out = subprocess.run(['swift', str(sw), png], capture_output=True, text=True).stdout.split()+ if len(out) == 2: cfg['face'] = [int(float(out[0])), int(float(out[1]))]; print('face', cfg['face'])+out = {'total': tl['total'], 'config': cfg, 'scenes': scenes}+json.dump(out, open(opt('--out', 'src/scenes.json'), 'w'), ensure_ascii=False, indent=0)+print(f"{len(scenes)} 个场景 · 总长 {tl['total']} 秒 · {'有 ' + str(bad) + ' 处空隙' if bad else '首尾相接'}")diff --git a/skills/digital-human-koubo/scripts/lin_sfx.py b/skills/digital-human-koubo/scripts/lin_sfx.pynew file mode 100644index 0000000..a3e80ce--- /dev/null+++ b/skills/digital-human-koubo/scripts/lin_sfx.py@@ -0,0 +1,114 @@+#!/usr/bin/env python3+"""按 scenes.json 自动排音效(earshot 音效库),渲成一条 sfx_bus.wav。+用法:python3 lin_sfx.py <工程>/src/scenes.json --out <工程>/audio [--kit kit.json]+- 第一次跑会 earshot kit init --preset calm,并改两个角色:drop = cut_hit/punch(「碰」:景深字、大数字、算例结果),pop = ui_pop/soft(卡片、标签、条形图)+- 规则:每次画面类型切换(主播 / B-roll / 题板)一声 whoosh.short;数字卡、标签 pop;清单打勾、推导行 tick;公式新项、利率卡 land;关键结论 bell+- 档位:drop/bell +7 dB、pop/land +3 dB、whoosh −2 dB(2026-10 实测:不加的话「碰」只比人声+音乐高 5 dB,被埋)+- 输出 sfx_bus.wav(48k 立体声,与成片同长)、sfx_cues.json、cues_earshot.json(给 earshot timeline --cues 复查)+earshot(可选,EARSHOT_PY 指向它的 python,默认 ~/tools/earshot/.venv/bin/python);没装就用工程 public/sfx(make_assets.py 合成)或 --sfx-dir 指定的目录兜底。"""+import json, os, subprocess, sys+from pathlib import Path+try:+ import numpy as np # noqa+except ImportError: # 系统 python 没装 numpy 时,换 earshot 自带的 python 重跑+ _E = os.environ.get('EARSHOT_PY', os.path.expanduser('~/tools/earshot/.venv/bin/python'))+ if os.path.exists(_E) and sys.executable != _E: os.execv(_E, [_E] + sys.argv)+ raise+a = sys.argv[1:]+if not a: sys.exit(__doc__)+opt = lambda k, d=None: a[a.index(k) + 1] if k in a else d+SR = 48000+P = json.load(open(a[0])); total = P['total']; S = P['scenes']+out = Path(opt('--out', 'audio')); out.mkdir(parents=True, exist_ok=True)+EPY = os.environ.get('EARSHOT_PY', os.path.expanduser('~/tools/earshot/.venv/bin/python'))+kitj = Path(opt('--kit', out / 'kit.json'))+cues = []+def c(t, role, label): cues.append((round(float(t), 3), role, label))+prev = None+for s in S:+ a0, T = s['a'], s['type']; vis = 'host' if T == 'host' else ('broll' if T == 'broll' else 'board')+ if prev is not None and (vis != prev or vis == 'broll'): c(a0, 'whoosh.short', 'cut→' + T)+ prev = vis+ if T == 'host':+ d = s.get('depth')+ if d: c(d.get('at', a0), 'drop', '景深字')+ if s.get('lower'): c(a0 + 0.4, 'pop', 'lower')+ if s.get('lower2'): c(s['lower2']['at'], 'pop', 'lower2')+ elif T == 'broll':+ for i, _ in enumerate(s.get('float') or []): c(a0 + 0.2 + i * 0.3, 'pop', 'float')+ if s.get('card'): c(s['cardAt'], 'pop', 'card')+ if s.get('slam'): c(s['slamAt'], 'drop', 'slam')+ if s.get('banner'): c(s['bannerAt'], 'land', 'banner')+ for i, _ in enumerate(s.get('chips') or []): c(s['chipsAt'] + i * (1.3 if s.get('stagger') else 0.35), 'pop', 'chip')+ for i, t in enumerate(s.get('statAt') or []): c(t, 'drop' if i == 0 else 'land', 'stat')+ if s.get('doc'): c(s['docAt'], 'land.light', 'doc')+ elif T == 'board':+ if s.get('big'): c(a0 + 0.25, 'land', 'big')+ if s.get('choices'): c(a0 + 0.4, 'pop', 'A'); c(s['reveal'], 'pop', 'B')+ for t in s.get('itemsAt') or []: c(t, 'tick', 'item')+ for i, _ in enumerate(s.get('chips') or []): c(s['chipsAt'] + i * 0.45, 'pop', 'chip')+ elif T == 'rates':+ for t in s['cardsAt']: c(t, 'land', 'rate')+ elif T == 'curve': c(s['labelAt'], 'pop', 'label')+ elif T == 'fall':+ for t in s['stepsAt']: c(t, 'pop', 'step')+ elif T == 'assume': c(s['reveal'], 'land', 'box1'); c(s['reveal'] + 1.6, 'land', 'box2'); c(s['resultAt'], 'bell', 'result')+ elif T == 'formula':+ for t in s['linesAt']: c(t, 'tick', 'line')+ elif T == 'big': c(a0 + 0.2, 'land', 'top'); c(s['bottomAt'], 'drop', 'bottom')+ elif T == 'stickers':+ for it in s['items']:+ if it.get('at') is not None: c(it['at'], 'pop', 'sticker')+ elif T == 'bars':+ for t in s['barsAt']: c(t, 'pop', 'bar')+ elif T == 'formula2':+ seen = set()+ for tm in s['terms']:+ if tm['at'] not in seen: seen.add(tm['at']); c(tm['at'], 'land', 'term')+ if s.get('final'): c(a0 + 0.3, 'bell', 'final')+ elif T == 'calc':+ for t in s.get('rowAt') or []: c(t, 'tick', 'row')+ c(s['resAt'], 'drop', 'result'); c(s['resAt'] + 0.05, 'bell', 'result')+ if s.get('extra'): c(s['extraAt'], 'pop', 'extra')+cues.sort()+TRIM = {'drop': 7, 'bell': 7, 'pop': 3, 'land': 3, 'whoosh.short': -2}+bus = np.zeros((int((total + 3) * SR), 2))+def put(x, start):+ st = int(max(0, start) * SR); n = min(len(x), len(bus) - st)+ if n > 0: bus[st:st + n] += x[:n]+def load(f): # 任意音频 → 48k 立体声 float(只靠 ffmpeg + numpy)+ raw = subprocess.run(['ffmpeg', '-v', 'error', '-i', str(f), '-f', 'f32le', '-ac', '2', '-ar', str(SR), '-'], capture_output=True, check=True).stdout+ return np.frombuffer(raw, np.float32).reshape(-1, 2).astype(np.float64)+if Path(EPY).exists():+ if not kitj.exists():+ subprocess.run([EPY, '-m', 'earshot', 'kit', 'init', '--preset', 'calm', '-o', str(kitj)], check=True)+ k = json.load(open(kitj))+ k['roles']['drop'] = {'sound': 'cut_hit/punch', 'takes': 3, 'align': 'onset', 'level_db': -4.0, 'note': '碰:景深字、大数字、算例结果'}+ k['roles']['pop'] = {'sound': 'ui_pop/soft', 'takes': 4, 'align': 'onset', 'level_db': -4.0, 'note': '卡片、标签、条形图'}+ k.get('off', {}).pop('drop', None); json.dump(k, open(kitj, 'w'), ensure_ascii=False, indent=1)+ subprocess.run([EPY, '-m', 'earshot', 'kit', 'render', str(kitj), '--out', str(out / 'kit')], check=True, capture_output=True)+ lock = json.load(open(out / 'kit' / 'kit.lock.json'))['roles']; idx = {}+ for t, role, _ in cues:+ r = lock[role]; takes = r['takes']; i = idx.get(role, 0); idx[role] = i + 1+ if role == 'bell': takes = [x for x in takes if x['file'] in ('bell_C6.wav', 'bell_E5.wav', 'bell_G5.wav')] or takes+ tk = takes[i % len(takes)]+ x = load(str(out / 'kit' / tk['file'])) * 10 ** ((float(r['level_db'] or 0) + TRIM.get(role, 0)) / 20)+ put(x, t + (r.get('offset_ms') or 0) / 1000 - tk[(r.get('align') or 'onset') + '_s'])+else:+ # 没装 earshot:用工程 public/sfx(new_edit.sh 调 make_assets.py 合成的那套),再不行用 promo-video 的+ cands = [Path(opt('--sfx-dir')) if opt('--sfx-dir') else None, Path(a[0]).resolve().parent.parent / 'public' / 'sfx', Path.home() / '.claude/skills/promo-video/assets/sfx']+ F = next((d for d in cands if d and (d / 'pop.wav').exists()), None)+ if not F: raise SystemExit('没装 earshot,也找不到音效目录:用 --sfx-dir 指定(要有 pop.wav whoosh.wav impact.wav tap.wav click.wav ding.wav)')+ M = {'whoosh.short': ('whoosh.wav', -14), 'drop': ('impact.wav', -4), 'pop': ('pop.wav', -8), 'land': ('tap.wav', -6), 'land.light': ('tap.wav', -10), 'tick': ('click.wav', -10), 'bell': ('ding.wav', -8)}+ print(f'没找到 earshot,用 {F} 的音效兜底')+ load_any = load+ cache = {}+ for t, role, _ in cues:+ f, g = M[role]+ if f not in cache: cache[f] = load_any(F / f) if (F / f).exists() else load_any(F / 'pop.wav')+ put(cache[f] * 10 ** (g / 20), t)+subprocess.run(['ffmpeg', '-v', 'error', '-y', '-f', 'f32le', '-ar', str(SR), '-ac', '2', '-i', '-', str(out / 'sfx_bus.wav')], input=bus.astype(np.float32).tobytes(), check=True)+json.dump([{'t': t, 'role': r, 'label': l} for t, r, l in cues], open(out / 'sfx_cues.json', 'w'), ensure_ascii=False, indent=0)+json.dump([{'t': t, 'label': f'{r}:{l}'} for t, r, l in cues], open(out / 'cues_earshot.json', 'w'), ensure_ascii=False)+from collections import Counter+print(len(cues), '个音效', dict(Counter(r for _, r, _ in cues)), '→', out / 'sfx_bus.wav')diff --git a/skills/digital-human-koubo/scripts/lin_subs.py b/skills/digital-human-koubo/scripts/lin_subs.pynew file mode 100644index 0000000..a61538b--- /dev/null+++ b/skills/digital-human-koubo/scripts/lin_subs.py@@ -0,0 +1,28 @@+#!/usr/bin/env python3+"""tl.json → cues.json 底部字幕(按标点断句,一句一条)。+用法:python3 lin_subs.py script.json --tl <工程>/src/tl.json --out <工程>/src/cues.json [--disp disp.txt]+--disp:每段一行的「显示稿」,标点断句数要和 script.json 一致;用来把念法换成写法(「五百万」→「500万」「百分之八」→「8%」)。+不给就直接用 script.json 的 t(段落里的 sub 映射也会套上)。"""+import json, re, sys+a = sys.argv[1:]+if not a: sys.exit(__doc__)+opt = lambda k, d=None: a[a.index(k) + 1] if k in a else d+S = json.load(open(a[0])); tl = json.load(open(opt('--tl', 'src/tl.json')))+D = [l.strip() for l in open(opt('--disp'))] if opt('--disp') else None+D = [l for l in D if l] if D else None+P = ',。?!:;'; subs = []+for k, seg in enumerate(tl['segs']):+ t = seg['text']; disp = D[k] if D else t+ if not D:+ for x, y in (S[k].get('sub') or {}).items(): disp = disp.replace(x, y)+ ch = {int(i): v for i, v in seg['chars'].items()}+ at = lambda i: (ch[min([j for j in ch if j >= i])] if [j for j in ch if j >= i] else seg['end'])+ cl = [c for c in re.split(f'(?<=[{P}])', t) if c.strip()]; dl = [c for c in re.split(f'(?<=[{P}])', disp) if c.strip()]+ if len(cl) != len(dl): sys.exit(f"{seg['id']}:显示稿断句数 {len(dl)} ≠ 念稿 {len(cl)}\n 念:{t}\n 显:{disp}")+ pos, times = 0, []+ for c in cl: times.append(at(pos)); pos += len(c)+ for i, c in enumerate(dl):+ a0 = max(seg['start'], times[i] - 0.08); b0 = (times[i + 1] - 0.08) if i + 1 < len(times) else seg['end'] - 0.05+ subs.append({'a': round(a0, 2), 'b': round(b0, 2), 't': c.rstrip(',。:;')})+json.dump({'subs': subs, 'total': tl['total']}, open(opt('--out', 'src/cues.json'), 'w'), ensure_ascii=False, indent=0)+print(len(subs), '条字幕')diff --git a/skills/digital-human-koubo/scripts/misread_check.py b/skills/digital-human-koubo/scripts/misread_check.pynew file mode 100644index 0000000..b6eb199--- /dev/null+++ b/skills/digital-human-koubo/scripts/misread_check.py@@ -0,0 +1,39 @@+#!/usr/bin/env python3+"""查数字人念错字:每段按停顿切成短句,**只带「普通话、简体」这句中性提示(不带原文)**逐句转写,和稿子逐字比。+用法:python3 misread_check.py script.json [--ids s10,s11] [--cut cut] [--out cut/misread.json]+为什么不用 assemble.py 的转写:whisper 带了原文 --prompt 会把念错的字「纠正」回去(2026-10 实测:「通胀」念成 tōng zhèng,带原文转写全对,不带才露出「通证」)。+输出每段:稿子 / 听到的短句 / 可疑字(稿子里的汉字没被听到的,数字和英文字母忽略)。可疑 ≠ 一定念错(同音字、方言腔会误报),用户要听;确认要修的写进 patch.json 给 patch_words.py。"""+import json, os, re, subprocess, sys, difflib+a = sys.argv[1:]+if not a: sys.exit(__doc__)+opt = lambda k, d=None: a[a.index(k) + 1] if k in a else d+S = json.load(open(a[0])); cut = opt('--cut', 'cut'); ids = set(opt('--ids').split(',')) if opt('--ids') else None+WM = os.environ.get('WHISPER_MODEL') or next((p for p in map(os.path.expanduser, ['~/Library/Application Support/Murmur/models/ggml-medium-q5_0.bin', '~/models/ggml-medium-q5_0.bin', '~/.cache/whisper/ggml-medium-q5_0.bin']) if os.path.exists(p)), None)+T2S = str.maketrans('們說這個裡麼開銷費國來長還沒錢會時後們對嗎讓過買兩萬億號歲學實際資產聽們讀變賺樂頭點為發見體條經義遠業應與夠單從當進現產間關門問題風險銀行條證寶貝數據統計報告億幾萬塊元萬', '们说这个里么开销费国来长还没钱会时后们对吗让过买两万亿号岁学实际资产听们读变赚乐头点为发见体条经义远业应与够单从当进现产间关门问题风险银行条证宝贝数据统计报告亿几万块元万')+HAN = re.compile('[^' + chr(0x4e00) + '-' + chr(0x9fff) + ']')+NUMC = '零〇一二三四五六七八九十百千万亿点两'+han = lambda s: HAN.sub('', s.translate(T2S).replace('百分之', ''))+hanx = lambda s: ''.join(ch for ch in han(s) if ch not in NUMC) # 数字两边写法不同(五百万 / 500万),比对时去掉+rep = []+for s in S:+ sid = s['id']+ if ids and sid not in ids: continue+ src = f'{cut}/{sid}.mp4'; wav = f'/tmp/_mr_{sid}.wav'+ subprocess.run(['ffmpeg', '-v', 'error', '-y', '-i', src, '-ar', '16000', '-ac', '1', wav], check=True)+ o = subprocess.run(['ffmpeg', '-i', wav, '-af', 'silencedetect=n=-32dB:d=0.18', '-f', 'null', '-'], capture_output=True, text=True).stderr+ st = [float(x) for x in re.findall(r'silence_start: ([\d.]+)', o)]; en = [float(x) for x in re.findall(r'silence_end: ([\d.]+)', o)]+ dur = float(subprocess.run(['ffprobe', '-v', 'error', '-show_entries', 'format=duration', '-of', 'csv=p=0', wav], capture_output=True, text=True).stdout)+ cuts = [0.0] + [(x + y) / 2 for x, y in zip(st, en) if x > 0.2 and y < dur - 0.1] + [dur]+ heard = []+ for x, y in zip(cuts, cuts[1:]):+ if y - x < 0.4: continue+ subprocess.run(['ffmpeg', '-v', 'error', '-y', '-ss', f'{x:.2f}', '-to', f'{y:.2f}', '-i', wav, '/tmp/_mr_w.wav'])+ r = subprocess.run(['whisper-cli', '-m', WM, '-l', 'zh', '--prompt', '以下是普通话,用简体中文。', '-nt', '-f', '/tmp/_mr_w.wav'], capture_output=True, text=True).stdout.strip().replace('\n', '')+ heard.append({'t': [round(x, 2), round(y, 2)], 'heard': r})+ A, B = hanx(s['t']), hanx(''.join(h['heard'] for h in heard))+ miss = []+ for op, i1, i2, j1, j2 in difflib.SequenceMatcher(None, A, B, autojunk=False).get_opcodes():+ if op in ('replace', 'delete'): miss.append(f"{A[i1:i2]}→{B[j1:j2] or '∅'}")+ rep.append({'id': sid, 'text': s['t'], 'clauses': heard, 'suspect': miss})+ print(f"{'⚠' if miss else ' '} {sid} {' '.join(miss)}\n " + ' '.join(f"[{h['t'][0]}-{h['t'][1]}]{h['heard']}" for h in heard))+json.dump(rep, open(opt('--out', f'{cut}/misread.json'), 'w'), ensure_ascii=False, indent=1)diff --git a/skills/digital-human-koubo/scripts/new_edit.sh b/skills/digital-human-koubo/scripts/new_edit.shindex 6f4307d..ca47d04 100755--- a/skills/digital-human-koubo/scripts/new_edit.sh+++ b/skills/digital-human-koubo/scripts/new_edit.sh@@ -23,7 +23,12 @@ if [ ! -f "$DST/public/sfx/pop.wav" ] || [ ! -f "$DST/public/music/bgm.mp3" ]; t[ -n "$PY" ] && "$PY" "$(dirname "$0")/make_assets.py" "$DST/public" || echo "⚠ 没找到装了 numpy 的 Python,音效没生成:python3 -m pip install numpy 后跑 python3 $(dirname "$0")/make_assets.py $DST/public"fiROOT="$(cd "$(dirname "$0")/.." && pwd)"-if [ "$TPL" = "huazi-916" ]; then+if [ "$TPL" = "lin-169" ]; then+ echo "✓ $DST 已就绪(小林式)。放入 public/main.mp4(cut/joined.mp4)、public/broll/、public/stickers/、public/cut/*.webm;然后:"+ echo " python3 $ROOT/scripts/lin_subs.py script.json --tl $DST/src/tl.json --out $DST/src/cues.json --disp disp.txt"+ echo " python3 $ROOT/scripts/lin_scenes.py plan.json --tl $DST/src/tl.json --out $DST/src/scenes.json --face (plan 写法见 $DST/plan.example.json)"+ echo " python3 $ROOT/scripts/lin_sfx.py $DST/src/scenes.json --out audio && python3 $ROOT/scripts/lin_mix.py --voice cut/joined.mov --bgm 曲子 --sfx audio/sfx_bus.wav --out $DST/public/mix.wav"+elif [ "$TPL" = "huazi-916" ]; thenecho "✓ $DST 已就绪。放入 public/main.mp4、public/voice.wav、src/tl.json,改 src/edit.json,然后:"echo " python3 $ROOT/scripts/check_edit.py $DST/src"elsediff --git a/skills/digital-human-koubo/scripts/patch_words.py b/skills/digital-human-koubo/scripts/patch_words.pynew file mode 100644index 0000000..b8b1c37--- /dev/null+++ b/skills/digital-human-koubo/scripts/patch_words.py@@ -0,0 +1,73 @@+#!/usr/bin/env python3+"""只替换念错的短句,保住口型(不整片换音色)。+用法:python3 patch_words.py script.json patch.json [--cut cut] [--ref s24,s41,s05]+patch.json = [{"id": "s11", "g": [2.1, 5.4], "m": [2.0, 5.3]}, ...]+ g = 原片里要换掉的那几句(秒,粗略即可,会吸附到最近的停顿);m = 克隆音整句里对应的那几句(先不填,跑一次 --synth-only 再看时间)+步骤:+ 1. --synth-only:用 --ref 指定的 2–3 段干净原声(合计 ≥15 秒)当参照,MiMo voiceclone 把要修的段整句重配到 cut/revoice/<id>.wav,并打印逐字时间+ 2. 填好 m 再跑:克隆句 atempo 拉到和原句一样长(0.85–1.15 之外会警告:句子差太多,口型会飘)→ 响度对齐 → 25 ms 交叉淡化贴回 → 写回 cut/<id>.mp4(画面不动、长度不变)→ 不带提示转写复核+ 3. 改完跑 assemble.py --rejoin 重新拼接(会做音画等长校验)+切点选在停顿上:一句话中间切会有接缝;整句换比只换两个字自然(2026-10 实测:只换「城镇」两字转写成「承认」,换整句就对)。"""+import json, os, re, subprocess, sys, base64+from pathlib import Path+import numpy as np+from scipy.io import wavfile+a = sys.argv[1:]+if len(a) < 2: sys.exit(__doc__)+opt = lambda k, d=None: a[a.index(k) + 1] if k in a else d+S = {s['id']: s for s in json.load(open(a[0]))}; spec = json.load(open(a[1])); cut = Path(opt('--cut', 'cut')); SR = 48000+rv = cut / 'revoice'; rv.mkdir(exist_ok=True)+WM = os.environ.get('WHISPER_MODEL') or next((p for p in map(os.path.expanduser, ['~/Library/Application Support/Murmur/models/ggml-medium-q5_0.bin', '~/models/ggml-medium-q5_0.bin']) if os.path.exists(p)), None)+def whisper(wav, ml=False):+ subprocess.run(['ffmpeg', '-v', 'error', '-y', '-i', wav, '-ar', '16000', '-ac', '1', '/tmp/_pw16.wav'])+ if ml:+ subprocess.run(['whisper-cli', '-m', WM, '-l', 'zh', '--prompt', '以下是普通话的句子。', '-ml', '1', '-oj', '-of', '/tmp/_pwml', '-f', '/tmp/_pw16.wav'], capture_output=True)+ return ' '.join(f"{t['text'].strip()}@{t['offsets']['from'] / 1000:.2f}" for t in json.load(open('/tmp/_pwml.json', errors='replace'))['transcription'] if t['text'].strip())+ return subprocess.run(['whisper-cli', '-m', WM, '-l', 'zh', '-nt', '-f', '/tmp/_pw16.wav'], capture_output=True, text=True).stdout.strip().replace('\n', '')+if '--synth-only' in a or not all('m' in p for p in spec):+ for d in [Path(__file__).parent, Path(__file__).resolve().parents[2] / 'finance-explainer/scripts', Path.home() / '.claude/skills/finance-explainer/scripts', Path.home() / '.claude/skills/promo-video/scripts']:+ if (d / 'narrate_mimo.py').exists(): sys.path.insert(0, str(d)); break+ import narrate_mimo as N # MiMo 调用(密钥读 MIMO_API_KEY 或 ~/.config/ai-teardown/mimo.env)+ key, base = N.env()+ refs = (opt('--ref') or '').split(',')+ if not refs[0]: sys.exit('要 --ref:2–3 段念得干净的原片段 id(合计 ≥15 秒)')+ ins = sum([['-i', str(cut / f'{r}.mp4')] for r in refs], [])+ subprocess.run(['ffmpeg', '-v', 'error', '-y', *ins, '-filter_complex', ''.join(f'[{i}:a]' for i in range(len(refs))) + f'concat=n={len(refs)}:v=0:a=1,aresample=24000', '-ac', '1', str(rv / 'ref.wav')], check=True)+ ref = 'data:audio/wav;base64,' + base64.b64encode((rv / 'ref.wav').read_bytes()).decode()+ for p in spec:+ out = rv / f"{p['id']}.wav"+ d = N.call(key, base, {'model': 'mimo-v2.5-tts-voiceclone', 'messages': [{'role': 'assistant', 'content': S[p['id']]['t']}], 'audio': {'format': 'wav', 'voice': ref}})+ out.with_suffix('.raw.wav').write_bytes(base64.b64decode(d['choices'][0]['message']['audio']['data']))+ subprocess.run(['ffmpeg', '-v', 'error', '-y', '-i', str(out.with_suffix('.raw.wav')), '-af', 'silenceremove=start_periods=1:start_threshold=-45dB:start_silence=0.03', '-ar', str(SR), '-ac', '1', str(out)], check=True)+ print(p['id'], '克隆整句:', whisper(str(out)), '\n 逐字:', whisper(str(out), True))+ sys.exit('填好 patch.json 里每条的 m(克隆音里对应句子的起止秒)再跑一次')+def sil(f):+ o = subprocess.run(['ffmpeg', '-i', f, '-af', 'silencedetect=n=-34dB:d=0.05', '-f', 'null', '-'], capture_output=True, text=True).stderr+ return [(x + y) / 2 for x, y in zip([float(v) for v in re.findall(r'silence_start: ([\d.]+)', o)], [float(v) for v in re.findall(r'silence_end: ([\d.]+)', o)])]+snap = lambda t, mids: min([m for m in mids if abs(m - t) <= 0.28], key=lambda m: abs(m - t), default=t)+def L(f):+ sr, x = wavfile.read(f); x = x.astype(np.float64) / 32768.0; return x if x.ndim == 1 else x.mean(1)+rms = lambda x: np.sqrt(np.mean(x ** 2) + 1e-12)+by = {}+for p in spec: by.setdefault(p['id'], []).append(p)+for sid, ps in by.items():+ src = cut / f'{sid}.mp4'; bak = cut / f'{sid}.orig.mp4'+ if not bak.exists(): bak.write_bytes(src.read_bytes())+ subprocess.run(['ffmpeg', '-v', 'error', '-y', '-i', str(bak), '-ac', '1', '-ar', str(SR), '/tmp/_pw_g.wav'], check=True)+ subprocess.run(['ffmpeg', '-v', 'error', '-y', '-i', str(rv / f'{sid}.wav'), '-ac', '1', '-ar', str(SR), '/tmp/_pw_m.wav'], check=True)+ g = L('/tmp/_pw_g.wav'); y = g.copy(); m = L('/tmp/_pw_m.wav'); gm, mm = sil('/tmp/_pw_g.wav'), sil('/tmp/_pw_m.wav')+ for p in sorted(ps, key=lambda p: -p['g'][0]):+ ga, gb = snap(p['g'][0], gm), min(snap(p['g'][1], gm), len(g) / SR); ma, mb = snap(p['m'][0], mm), min(snap(p['m'][1], mm), len(m) / SR)+ tempo = (mb - ma) / (gb - ga)+ if not 0.85 <= tempo <= 1.15: print(f'⚠ {sid} 伸缩 {tempo:.2f}:克隆句和原句长度差太多,口型会飘,考虑换一次克隆或调切点')+ wavfile.write('/tmp/_pw_in.wav', SR, (m[int(ma * SR):int(mb * SR)] * 32767).astype(np.int16))+ subprocess.run(['ffmpeg', '-v', 'error', '-y', '-i', '/tmp/_pw_in.wav', '-af', f'atempo={tempo:.4f}', '-ar', str(SR), '/tmp/_pw_out.wav'], check=True)+ seg = L('/tmp/_pw_out.wav'); n = int((gb - ga) * SR); seg = np.pad(seg, (0, max(0, n - len(seg))))[:n]+ seg *= rms(g[int(ga * SR):int(gb * SR)]) / rms(seg)+ f = int(0.025 * SR); w = np.ones(n); w[:f] = np.linspace(0, 1, f); w[-f:] = np.linspace(1, 0, f)+ a0 = int(ga * SR); y[a0:a0 + n] = y[a0:a0 + n] * (1 - w) + seg * w+ print(f'{sid} 换 {ga:.2f}–{gb:.2f}s(克隆 {ma:.2f}–{mb:.2f},伸缩 {tempo:.3f})')+ wavfile.write('/tmp/_pw_fixed.wav', SR, (np.clip(y, -1, 1) * 32767).astype(np.int16))+ subprocess.run(['ffmpeg', '-v', 'error', '-y', '-i', str(bak), '-i', '/tmp/_pw_fixed.wav', '-map', '0:v', '-map', '1:a', '-c:v', 'copy', '-ac', '2', '-c:a', 'aac', '-b:a', '192k', '-shortest', str(src)], check=True)+ print(f' 复核(不带提示):{whisper("/tmp/_pw_fixed.wav")}')+print('改完跑:python3 assemble.py script.json ids.json --rejoin')diff --git a/skills/digital-human-koubo/templates/lin-169/README.md b/skills/digital-human-koubo/templates/lin-169/README.mdnew file mode 100644index 0000000..58dd1df--- /dev/null+++ b/skills/digital-human-koubo/templates/lin-169/README.md@@ -0,0 +1,11 @@+# lin-169 · 小林式解说模板(16:9)++起工程:`bash ~/.claude/skills/digital-human-koubo/scripts/new_edit.sh lin-169 <工程>`,流程见 `references/lin-style.md`。++- `src/Lin.tsx`:13 种场景(host / broll / board / rates / curve / fall / assume / formula / big / stickers / bars / formula2 / calc),字段写在每个组件上方的注释里+- `src/scenes.json`、`src/cues.json`:示例数据(72 法则,6 段约 36 秒,时间是手排的),换成本期 lin_scenes.py / lin_subs.py 的输出+- `plan.example.json` + `script.example.json`:示例分镜和对应的口播稿(时间写 `@s03:等于`),`scripts/lin_scenes.py` 把它转成 scenes.json+- `disp.example.txt`:显示稿示例(数字写成阿拉伯数字,断句和念稿一致)+- `public/`:main.mp4(拼好的口播)、mix.wav(lin_mix.py 出的混音)、broll/B01.mp4…、stickers/sticker_0.png…、cut/<段>.webm(景深字抠像)。素材不随模板带。++config(scenes.json 顶层):`face` 主播脸中心(lin_scenes.py --face 自动量)、`audio` 音轨文件、`disclosure` 右上角 AI 标注("" 关掉)、`brollTag` B-roll 角标、`colors` 改配色。diff --git a/skills/digital-human-koubo/templates/lin-169/disp.example.txt b/skills/digital-human-koubo/templates/lin-169/disp.example.txtnew file mode 100644index 0000000..fcab5ea--- /dev/null+++ b/skills/digital-human-koubo/templates/lin-169/disp.example.txt@@ -0,0 +1,6 @@+存一笔钱,多久能翻一倍?有个特别好用的心算方法。+它叫72法则:用72,除以年化收益率。+比如年化6%,72除以6,等于12,大约12年翻一倍。+年化2%呢?要36年。差几个点,差的是半辈子。+所以别小看那一两个点的收益,也别小看每年扣掉的手续费。+你的钱现在按什么速度在长?评论区聊聊。diff --git a/skills/digital-human-koubo/templates/lin-169/package.json b/skills/digital-human-koubo/templates/lin-169/package.jsonnew file mode 100644index 0000000..1008a5c--- /dev/null+++ b/skills/digital-human-koubo/templates/lin-169/package.json@@ -0,0 +1,35 @@+{+ "name": "lin-169",+ "version": "1.0.0",+ "private": true,+ "scripts": {+ "studio": "remotion studio",+ "render": "remotion render"+ },+ "dependencies": {+ "@react-three/fiber": "9.8.1",+ "@react-three/postprocessing": "3.1.2",+ "@remotion/cli": "4.0.408",+ "@remotion/motion-blur": "4.0.408",+ "@remotion/paths": "4.0.408",+ "@remotion/three": "4.0.408",+ "@remotion/transitions": "4.0.408",+ "gsap": "3.15.0",+ "lottie-web": "5.13.0",+ "lucide-react": "1.48.0",+ "motion-dom": "12.43.0",+ "motion-utils": "12.39.0",+ "react": "19.0.0",+ "react-dom": "19.0.0",+ "remotion": "4.0.408",+ "three": "0.176.0",+ "d3-geo": "^3.1.1",+ "topojson-client": "^3.1.0",+ "world-atlas": "^2.0.2"+ },+ "devDependencies": {+ "@types/react": "19.0.0",+ "@types/three": "0.176.0",+ "typescript": "5.8.2"+ }+}\ No newline at end of filediff --git a/skills/digital-human-koubo/templates/lin-169/plan.example.json b/skills/digital-human-koubo/templates/lin-169/plan.example.jsonnew file mode 100644index 0000000..852a4e1--- /dev/null+++ b/skills/digital-human-koubo/templates/lin-169/plan.example.json@@ -0,0 +1,12 @@+{+ "config": {"audio": "mix.wav", "disclosure": "内容由 AI 数字人演绎", "brollTag": "AI 生成画面"},+ "scenes": [+ {"type": "host", "a": "@s01", "b": "@s01:有个", "depth": {"src": "cut/s01.webm", "lines": ["翻倍"], "at": "@s01:翻|-0.2"}},+ {"type": "board", "a": "@s01:有个", "b": "@s01:end", "tag": "想一想", "title": "存一笔钱", "big": ["多久翻一倍?"], "pip": "rect-r"},+ {"type": "big", "a": "@s02", "b": "@s02:end", "top": "72 法则", "bottom": "72 ÷ 年化", "bottomAt": "@s02:用", "pip": "rect-r"},+ {"type": "calc", "a": "@s03", "b": "@s03:end", "tag": "年化 6%", "row": ["72", "÷ 6"], "rowAt": ["@s03:七十二", "@s03:除以"], "res": "≈ 12 年翻倍", "resAt": "@s03:等于", "pip": "rect-r"},+ {"type": "bars", "a": "@s04", "b": "@s04:end", "title": "翻一倍要多少年", "bars": [["年化 6%", 12], ["年化 2%", 36]], "barsAt": ["@s04", "@s04:三十六"], "unit": "年", "highlight": 1, "pip": "rect-r"},+ {"type": "broll", "a": "@s05", "b": "@s05:end", "clip": "B01", "chips": ["收益率:多 1–2 个点", "手续费:每年扣一点"], "chipsAt": "@s05:收益"},+ {"type": "host", "a": "@s06", "b": "@s06:end", "lower": ["你的钱", "按什么速度在长?"]}+ ]+}diff --git a/skills/digital-human-koubo/templates/lin-169/public/broll/.gitkeep b/skills/digital-human-koubo/templates/lin-169/public/broll/.gitkeepnew file mode 100644index 0000000..e69de29diff --git a/skills/digital-human-koubo/templates/lin-169/public/cut/.gitkeep b/skills/digital-human-koubo/templates/lin-169/public/cut/.gitkeepnew file mode 100644index 0000000..e69de29diff --git a/skills/digital-human-koubo/templates/lin-169/public/stickers/.gitkeep b/skills/digital-human-koubo/templates/lin-169/public/stickers/.gitkeepnew file mode 100644index 0000000..e69de29diff --git a/skills/digital-human-koubo/templates/lin-169/remotion.config.ts b/skills/digital-human-koubo/templates/lin-169/remotion.config.tsnew file mode 100644index 0000000..1b04ecf--- /dev/null+++ b/skills/digital-human-koubo/templates/lin-169/remotion.config.ts@@ -0,0 +1,8 @@+import { Config } from "@remotion/cli/config";++Config.setVideoImageFormat("jpeg");+Config.setJpegQuality(95);+Config.setCodec("h264");+Config.setCrf(16);+Config.setPixelFormat("yuv420p");+Config.setChromiumOpenGlRenderer("angle");diff --git a/skills/digital-human-koubo/templates/lin-169/script.example.json b/skills/digital-human-koubo/templates/lin-169/script.example.jsonnew file mode 100644index 0000000..121f2cc--- /dev/null+++ b/skills/digital-human-koubo/templates/lin-169/script.example.json@@ -0,0 +1,8 @@+[+ {"id": "s01", "shot": "depth", "t": "存一笔钱,多久能翻一倍?有个特别好用的心算方法。"},+ {"id": "s02", "shot": "pip", "t": "它叫七十二法则:用七十二,除以年化收益率。"},+ {"id": "s03", "shot": "pip", "t": "比如年化百分之六,七十二除以六,等于十二,大约十二年翻一倍。"},+ {"id": "s04", "shot": "pip", "t": "年化百分之二呢?要三十六年。差几个点,差的是半辈子。"},+ {"id": "s05", "shot": "pip", "t": "所以别小看那一两个点的收益,也别小看每年扣掉的手续费。"},+ {"id": "s06", "shot": "full", "t": "你的钱现在按什么速度在长?评论区聊聊。"}+]diff --git a/skills/digital-human-koubo/templates/lin-169/src/Lin.tsx b/skills/digital-human-koubo/templates/lin-169/src/Lin.tsxnew file mode 100644index 0000000..dba1079--- /dev/null+++ b/skills/digital-human-koubo/templates/lin-169/src/Lin.tsx@@ -0,0 +1,450 @@+// 小林式解说(16:9):主播全屏 / 景深字 / 紫色题板 + 主播小窗 / B-roll + 数据卡 / 图表 / 公式逐项长出 / 算例填数。+// 数据驱动:src/scenes.json(scripts/lin_scenes.py 生成,时间都是整片绝对秒)+ src/cues.json(字幕,scripts/lin_subs.py 生成)。+// 所有动画由帧号推导;主播小窗 = 同一条 public/main.mp4 按全局时间同步裁脸。+import React from "react";+import { AbsoluteFill, Audio, Img, OffthreadVideo, Sequence, interpolate, spring, staticFile, useCurrentFrame, useVideoConfig } from "remotion";+import plan from "./scenes.json";+import cues from "./cues.json";++const FPS = 30;+const CFG: any = (plan as any).config || {};+const FONT = '"PingFang SC", "Hiragino Sans GB", sans-serif';+const NUM = '"DIN Alternate", "DIN Condensed", "Helvetica Neue", sans-serif';+const C = { bg1: "#1E1233", bg2: "#35205A", line: "rgba(255,226,160,0.35)", gold: "#F6E3A1", gold2: "#E9C46A", lime: "#DDF27C", ink: "#FFFFFF", dim: "rgba(255,255,255,0.62)", teal: "#4FB3A9", red: "#E25B4B", ...(CFG.colors || {}) };+const goldText: React.CSSProperties = { background: "linear-gradient(180deg,#FFF6D2 0%,#F3D98B 45%,#C99A3E 100%)", WebkitBackgroundClip: "text", color: "transparent" };+// 主播脸在 main.mp4(按 1920×1080 计)里的中心点:小窗按它裁。换形象/机位后用 scripts/lin_scenes.py --face 量一次+const FACE = { x: CFG.face?.[0] ?? 1215, y: CFG.face?.[1] ?? 390 };+const AUDIO = CFG.audio ?? "mix.wav"; // 混好的整片音轨;没有就写 "main.mp4"+const DISCLOSURE = CFG.disclosure ?? "内容由 AI 数字人演绎";+const BROLL_TAG = CFG.brollTag ?? "AI 生成画面";+type Sc = any;++const clamp = { extrapolateLeft: "clamp" as const, extrapolateRight: "clamp" as const };+const useK = (at: number, cfg = { damping: 16, stiffness: 150 }) => {+ const f = useCurrentFrame(); return spring({ frame: f - Math.round(at * FPS), fps: FPS, config: cfg });+};+const Pop: React.FC<{ at: number; children: React.ReactNode; dy?: number; style?: React.CSSProperties }> = ({ at, children, dy = 24, style }) => {+ const k = useK(at);+ return <div style={{ opacity: Math.min(1, k * 1.3), transform: `translateY(${(1 - k) * dy}px) scale(${0.94 + 0.06 * k})`, ...style }}>{children}</div>;+};++/* ── 主播小窗:circle-tl / circle-bl / rect-l / rect-r ── */+export const PIP_BOX: Record<string, [number, number, number, number]> = { "circle-tl": [70, 60, 300, 300], "circle-bl": [70, 630, 300, 300], "rect-l": [70, 220, 400, 520], "rect-r": [1450, 220, 400, 520] };+const Pip: React.FC<{ kind: string; a: number }> = ({ kind, a }) => {+ const k = useK(0.05);+ if (!kind || kind === "none") return null;+ const circle = kind.startsWith("circle");+ const [x, y, W, H] = PIP_BOX[kind];+ const s = circle ? 0.62 : 0.82, cy = circle ? W / 2 : 190;+ return (+ <div style={{ position: "absolute", left: x, top: y, width: W, height: H, borderRadius: circle ? "50%" : 22, overflow: "hidden", border: `4px solid ${C.gold2}`,+ boxShadow: "0 18px 50px rgba(0,0,0,.45)", opacity: k, transform: `scale(${0.85 + 0.15 * k})` }}>+ <OffthreadVideo src={staticFile("main.mp4")} muted startFrom={Math.round(a * FPS)}+ style={{ position: "absolute", width: 1920 * s, height: 1080 * s, left: W / 2 - FACE.x * s, top: cy - FACE.y * s, maxWidth: "none" }} />+ </div>+ );+};+// 题板面板避开小窗:右侧方形小窗时面板靠左,否则靠右+const panelX = (pip: string, w: number) => (pip === "rect-r" ? 110 : pip === "rect-l" || pip?.startsWith("circle") ? 1920 - 110 - w : 110);++/* ── 紫色题板背景 ── */+const BoardBg: React.FC = () => {+ const f = useCurrentFrame();+ return (+ <AbsoluteFill style={{ background: `radial-gradient(120% 90% at 30% 20%, ${C.bg2} 0%, ${C.bg1} 70%)` }}>+ <AbsoluteFill style={{ backgroundImage: "linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px)", backgroundSize: "64px 64px" }} />+ <div style={{ position: "absolute", left: -120, bottom: -160, width: 520, height: 520, borderRadius: 80, background: "#5B8F3A", opacity: 0.35, transform: `rotate(${18 + f * 0.02}deg)` }} />+ <div style={{ position: "absolute", right: -90, top: -140, width: 420, height: 420, borderRadius: 70, background: C.teal, opacity: 0.22, transform: `rotate(${-14 - f * 0.015}deg)` }} />+ {[0, 1].map((i) => <div key={i} style={{ position: "absolute", left: 0, right: 0, [i ? "bottom" : "top"]: 0, height: 26, backgroundImage: `repeating-linear-gradient(90deg, ${C.gold2} 0 22px, transparent 22px 44px)`, opacity: 0.25 }} />)}+ </AbsoluteFill>+ );+};+const Panel: React.FC<{ x: number; y: number; w: number; h: number; children: React.ReactNode }> = ({ x, y, w, h, children }) => {+ const k = useK(0);+ return (+ <div style={{ position: "absolute", left: x, top: y, width: w, height: h, borderRadius: 28, background: "linear-gradient(180deg, rgba(70,48,112,.92), rgba(44,28,74,.94))",+ border: `2px solid ${C.line}`, boxShadow: "0 30px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08)", opacity: k, transform: `translateY(${(1 - k) * 30}px)`,+ display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", fontFamily: FONT, color: C.ink }}>{children}</div>+ );+};+const Tag: React.FC<{ t: string }> = ({ t }) => <div style={{ background: C.gold2, color: "#2A1A40", fontSize: 30, fontWeight: 800, padding: "6px 22px", borderRadius: 10, marginBottom: 18 }}>{t}</div>;+const Title: React.FC<{ t: string }> = ({ t }) => <div style={{ fontSize: 46, fontWeight: 700, letterSpacing: "0.06em", color: C.gold, marginBottom: 26 }}>{t}</div>;++/* ── host:主播全屏,可叠景深字 depth / 侧卡 lower / lower2 ── */+const Host: React.FC<{ s: Sc }> = ({ s }) => (+ <AbsoluteFill>+ {s.depth && <DepthText d={s.depth} a={s.a} />}+ {s.lower && <Lower t={s.lower} at={0.4} until={(s.lowerTo ?? s.b) - s.a} />}+ {s.lower2 && <Lower t={s.lower2.t} at={s.lower2.at - s.a} until={s.b - s.a} />}+ </AbsoluteFill>+);+// 景深字:大字 → 抠出来的主播(scripts/cutout_video.py 抠 cut/<段>.mp4,cutout 从场景开头起播);count=1 时数字从 0 滚到目标+const DepthText: React.FC<{ d: any; a: number }> = ({ d, a }) => {+ const f = useCurrentFrame();+ const at = (d.at ?? a) - a;+ const k = spring({ frame: f - Math.round(at * FPS), fps: FPS, config: { damping: 14, stiffness: 120 } });+ let txt = d.lines[0];+ if (d.count) txt = String(Math.round(interpolate(f, [at * FPS, at * FPS + 24], [0, Number(txt)], clamp)));+ const len = d.lines[0].length;+ const size = d.size ?? (len <= 3 ? 520 : len === 4 ? 330 : 270);+ return (+ <>+ <AbsoluteFill style={{ alignItems: "center", justifyContent: "flex-start", paddingTop: d.top ?? (len <= 3 ? 40 : 90) }}>+ <div style={{ fontFamily: len <= 3 ? NUM : FONT, fontWeight: 900, fontSize: size, lineHeight: 1, letterSpacing: "0.04em", ...goldText,+ opacity: Math.min(1, k * 1.4), transform: `translateY(${(1 - k) * 120}px) scale(${0.9 + 0.1 * k})`, filter: "drop-shadow(0 10px 30px rgba(0,0,0,.35))", whiteSpace: "nowrap" }}>{txt}</div>+ </AbsoluteFill>+ <OffthreadVideo src={staticFile(d.src)} transparent muted style={{ position: "absolute", width: 1920, height: 1080 }} />+ </>+ );+};+const Lower: React.FC<{ t: string[]; at: number; until: number }> = ({ t, at, until }) => {+ const f = useCurrentFrame();+ const k = useK(at); const out = interpolate(f, [until * FPS - 10, until * FPS], [1, 0], clamp);+ return (+ <div style={{ position: "absolute", left: 90, top: 300, opacity: k * out, transform: `translateX(${(1 - k) * -50}px)` }}>+ <div style={{ background: "rgba(30,18,51,.86)", border: `2px solid ${C.gold2}`, borderRadius: 20, padding: "22px 30px", fontFamily: FONT, boxShadow: "0 20px 50px rgba(0,0,0,.35)" }}>+ <div style={{ fontSize: 34, color: C.gold, fontWeight: 600 }}>{t[0]}</div>+ <div style={{ fontSize: 46, color: "#fff", fontWeight: 800, marginTop: 6 }}>{t[1]}</div>+ </div>+ </div>+ );+};++/* ── broll:public/broll/<clip>.mp4 全屏慢推 + 主播圆窗;可叠 float / card / slam / banner / chips / stat / doc ── */+const Broll: React.FC<{ s: Sc }> = ({ s }) => {+ const f = useCurrentFrame(); const d = s.b - s.a;+ const rate = Math.max(0.55, Math.min(1, (s.clipLen ?? 5) / d));+ const zoom = interpolate(f, [0, d * FPS], [1.02, 1.12], clamp);+ const r = (t: number) => t - s.a;+ return (+ <AbsoluteFill style={{ background: "#000" }}>+ <AbsoluteFill style={{ transform: `scale(${zoom})` }}>+ <OffthreadVideo src={staticFile(`broll/${s.clip}.mp4`)} muted playbackRate={rate} style={{ width: "100%", height: "100%", objectFit: "cover" }} />+ </AbsoluteFill>+ <AbsoluteFill style={{ background: "linear-gradient(90deg, rgba(20,10,35,.55) 0%, rgba(20,10,35,.05) 55%)" }} />+ {BROLL_TAG && <div style={{ position: "absolute", right: 36, bottom: 30, fontFamily: FONT, fontSize: 20, color: "rgba(255,255,255,.8)", background: "rgba(0,0,0,.35)", padding: "4px 10px", borderRadius: 6 }}>{BROLL_TAG}</div>}+ {s.float && s.float.map((t: string, i: number) => {+ const k = spring({ frame: f - 6 - i * 9, fps: FPS, config: { damping: 12, stiffness: 120 } });+ const xs = [560, 1180, 860], ys = [300, 260, 560];+ return <div key={i} style={{ position: "absolute", left: xs[i % 3], top: ys[i % 3] - f * 0.6, fontFamily: FONT, fontWeight: 900, fontSize: i === 2 ? 150 : 110, ...goldText, opacity: k, transform: `scale(${0.6 + 0.4 * k})`, filter: "drop-shadow(0 8px 24px rgba(0,0,0,.6))" }}>{t}</div>;+ })}+ {s.card && <Pop at={r(s.cardAt)} style={{ position: "absolute", left: 420, top: 300 }}>+ <div style={{ background: "rgba(30,18,51,.86)", border: `2px solid ${C.gold2}`, borderRadius: 24, padding: "28px 38px", fontFamily: FONT, boxShadow: "0 24px 60px rgba(0,0,0,.4)" }}>+ <div style={{ fontSize: 34, color: C.gold, fontWeight: 600 }}>{s.card[0]}</div>+ <div style={{ fontSize: 72, color: "#fff", fontWeight: 900, fontFamily: NUM, marginTop: 8 }}>{s.card[1]}</div>+ {s.card[2] && <div style={{ fontSize: 34, color: "#fff", fontWeight: 600, marginTop: 6, opacity: .9 }}>{s.card[2]}</div>}+ </div></Pop>}+ {s.slam && <AbsoluteFill style={{ alignItems: "center", justifyContent: "center" }}>+ {(() => { const k = spring({ frame: f - Math.round(r(s.slamAt) * FPS), fps: FPS, config: { damping: 9, stiffness: 160 } });+ return <div style={{ fontFamily: FONT, fontWeight: 900, fontSize: 230, color: "#fff", textShadow: `0 0 40px ${C.red}, 0 10px 30px rgba(0,0,0,.6)`, opacity: Math.min(1, k * 1.5), transform: `scale(${2 - k})` }}>{s.slam}</div>; })()}+ </AbsoluteFill>}+ {s.banner && <Pop at={r(s.bannerAt)} style={{ position: "absolute", left: 0, right: 0, top: 640, display: "flex", justifyContent: "center" }}>+ <div style={{ display: "flex", gap: 18, alignItems: "center", background: "rgba(20,12,36,.88)", border: `2px solid ${C.gold2}`, borderRadius: 18, padding: "20px 40px", fontFamily: FONT, fontSize: 62, fontWeight: 900 }}>+ {s.banner.map((t: string, i: number) => <span key={i} style={{ color: "#fff", ...(i % 2 ? { background: i === s.banner.length - 1 ? C.red : "#3E5BA9", padding: "0 14px", borderRadius: 10 } : {}) }}>{t}</span>)}+ </div></Pop>}+ {s.chips && <div style={{ position: "absolute", left: 420, top: 330, display: "flex", flexDirection: "column", gap: 22 }}>+ {s.chips.map((c: string, i: number) => <Pop key={i} at={r(s.chipsAt) + i * (s.stagger ? 1.3 : 0.35)}>+ <div style={{ display: "inline-block", background: "rgba(30,18,51,.86)", border: `2px solid ${C.gold2}`, borderRadius: 999, padding: "14px 34px", fontFamily: FONT, fontSize: 48, fontWeight: 800, color: "#fff" }}>{c}</div></Pop>)}+ </div>}+ {s.stat && <div style={{ position: "absolute", left: 420, top: 240, display: "flex", flexDirection: "column", gap: 30 }}>+ {s.stat.map((x: string[], i: number) => <Pop key={i} at={r(s.statAt[i])}>+ <div style={{ fontFamily: FONT, fontSize: 34, color: C.gold, fontWeight: 600 }}>{x[0]}</div>+ <div style={{ fontFamily: NUM, fontSize: i === 0 ? 190 : 120, fontWeight: 900, lineHeight: 1, ...goldText, filter: "drop-shadow(0 8px 24px rgba(0,0,0,.5))" }}>{x[1]}</div></Pop>)}+ </div>}+ {s.doc && <Pop at={r(s.docAt)} style={{ position: "absolute", left: 420, top: 250 }}>+ <div style={{ width: 640, background: "#FBF8F0", borderRadius: 10, padding: "36px 44px", fontFamily: FONT, color: "#222", boxShadow: "0 30px 70px rgba(0,0,0,.5)", transform: "rotate(-2deg)" }}>+ <div style={{ fontSize: 44, fontWeight: 900 }}>{s.doc[0]}</div>+ <div style={{ height: 2, background: "#ddd", margin: "18px 0" }} />+ <div style={{ fontSize: 38, lineHeight: 1.6 }}>{s.doc[1]}<br /><span style={{ background: "#FFE76A", padding: "0 6px" }}>{s.doc[2]}</span></div>+ </div></Pop>}+ <Pip kind={s.pip ?? "circle-bl"} a={s.a} />+ </AbsoluteFill>+ );+};++/* ── board:题板。tag / title / big[] / sub / choices[[字母,小字,大字]] + reveal / items[] + itemsAt[] / chips[] + chipsAt ── */+const Board: React.FC<{ s: Sc }> = ({ s }) => {+ const r = (t: number) => t - s.a; const w = 1300;+ return (+ <AbsoluteFill>+ <BoardBg />+ <Panel x={panelX(s.pip, w)} y={150} w={w} h={720}>+ {s.tag && <Tag t={s.tag} />}+ {s.title && <Title t={s.title} />}+ {s.big && s.big.map((b: string, i: number) => <Pop key={i} at={0.25 + i * 0.5}><div style={{ fontSize: s.big.length > 1 ? 92 : 120, fontWeight: 900, ...goldText, lineHeight: 1.2, textAlign: "center" }}>{b}</div></Pop>)}+ {s.sub && <Pop at={0.8}><div style={{ fontSize: 40, color: C.dim, marginTop: 26 }}>{s.sub}</div></Pop>}+ {s.choices && <div style={{ display: "flex", gap: 50, marginTop: 10 }}>+ {s.choices.map((c: string[], i: number) => <Pop key={i} at={i === 0 ? 0.4 : r(s.reveal)}>+ <div style={{ width: 460, padding: "36px 30px", borderRadius: 24, background: i ? "rgba(221,242,124,.14)" : "rgba(255,255,255,.07)", border: `2px solid ${i ? C.lime : C.line}`, textAlign: "center" }}>+ <div style={{ fontFamily: NUM, fontSize: 80, fontWeight: 900, color: i ? C.lime : C.gold }}>{c[0]}</div>+ <div style={{ fontSize: 38, color: C.dim, marginTop: 8 }}>{c[1]}</div>+ <div style={{ fontSize: 52, fontWeight: 800, marginTop: 10 }}>{c[2]}</div></div></Pop>)}+ </div>}+ {s.items && <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr", gap: 30 }}>+ {s.items.map((t: string, i: number) => <Pop key={i} at={r(s.itemsAt[i])}>+ <div style={{ width: 440, padding: "30px 0", borderRadius: 20, background: "rgba(255,255,255,.07)", border: `2px solid ${C.line}`, textAlign: "center", fontSize: 54, fontWeight: 800 }}>+ <span style={{ color: C.lime, marginRight: 14 }}>✓</span>{t}</div></Pop>)}+ </div>}+ {s.chips && <div style={{ display: "flex", gap: 30, marginTop: 40 }}>+ {s.chips.map((c: string, i: number) => <Pop key={i} at={r(s.chipsAt) + i * 0.45}><div style={{ fontFamily: NUM, fontSize: 64, fontWeight: 900, color: "#2A1A40", background: C.lime, padding: "10px 34px", borderRadius: 16 }}>{c}</div></Pop>)}+ </div>}+ </Panel>+ <Pip kind={s.pip} a={s.a} />+ </AbsoluteFill>+ );+};++/* ── rates:2–3 张大数字卡 cards[[标签,数字,单位]] + cardsAt[](最后一张标红) ── */+const Rates: React.FC<{ s: Sc }> = ({ s }) => (+ <AbsoluteFill>+ <BoardBg />+ <div style={{ position: "absolute", left: s.pip === "rect-r" ? 110 : 560, top: 240, display: "flex", gap: 40 }}>+ {s.cards.map((c: string[], i: number) => <Pop key={i} at={s.cardsAt[i] - s.a}>+ <div style={{ width: 380, height: 500, borderRadius: 26, background: i === s.cards.length - 1 ? "linear-gradient(180deg,#7A2232,#4A1424)" : "linear-gradient(180deg,#2B3F7A,#1C2950)", border: `3px solid ${C.gold2}`,+ display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", fontFamily: FONT, boxShadow: "0 30px 70px rgba(0,0,0,.5)" }}>+ <div style={{ fontSize: 34, color: C.gold, fontWeight: 600 }}>{c[0]}</div>+ <div style={{ display: "flex", alignItems: "baseline", marginTop: 30 }}>+ <span style={{ fontFamily: NUM, fontSize: 170, fontWeight: 900, ...goldText }}>{c[1]}</span><span style={{ fontSize: 56, color: C.gold, marginLeft: 8 }}>{c[2]}</span></div>+ </div></Pop>)}+ </div>+ <Pip kind={s.pip} a={s.a} />+ </AbsoluteFill>+);++/* ── curve:长期上涨曲线(示意)title / label + labelAt ── */+const Curve: React.FC<{ s: Sc }> = ({ s }) => {+ const f = useCurrentFrame();+ const pts: [number, number][] = [];+ for (let i = 0; i <= 120; i++) { const x = i / 120; pts.push([x, Math.exp(3.2 * x) - 1 + 0.6 * Math.sin(i * 1.7) * x + 0.4 * Math.sin(i * 0.53) * x]); }+ const maxY = Math.max(...pts.map((p) => p[1])); const W = 1040, H = 520;+ const d = pts.map((p, i) => `${i ? "L" : "M"}${(p[0] * W).toFixed(1)},${(H - (p[1] / maxY) * H).toFixed(1)}`).join(" ");+ const prog = interpolate(f, [8, 6.5 * FPS], [0, 1], clamp);+ return (+ <AbsoluteFill>+ <BoardBg />+ <Panel x={panelX(s.pip, 1240)} y={140} w={1240} h={760}>+ <div style={{ fontSize: 40, color: C.gold, fontWeight: 700, alignSelf: "flex-start", marginLeft: 70 }}>{s.title}</div>+ <svg width={W + 40} height={H + 40} style={{ marginTop: 20 }}><g transform="translate(20,20)">+ {[0, 1, 2, 3, 4].map((i) => <line key={i} x1={0} x2={W} y1={(H / 4) * i} y2={(H / 4) * i} stroke="rgba(255,255,255,.08)" />)}+ <path d={d} fill="none" stroke={C.lime} strokeWidth={5} strokeDasharray={4000} strokeDashoffset={4000 * (1 - prog)} />+ </g></svg>+ <Pop at={s.labelAt - s.a} style={{ position: "absolute", left: 140, top: 200 }}>+ <div style={{ fontFamily: FONT, fontSize: 64, fontWeight: 900, color: "#2A1A40", background: C.lime, padding: "10px 30px", borderRadius: 16 }}>{s.label}</div></Pop>+ </Panel>+ <Pip kind={s.pip} a={s.a} />+ </AbsoluteFill>+ );+};++/* ── fall:瀑布柱(起点 / 扣除 / 结果)steps[[标签,数值]] + stepsAt[] ── */+const FallBar: React.FC<{ st: string[]; at: number; i: number }> = ({ st, at, i }) => {+ const k = useK(at); const hs = [420, 170, 250], tops = [0, 0, 170], cols = [C.teal, C.red, C.lime];+ return (+ <div style={{ width: 280, display: "flex", flexDirection: "column", alignItems: "center" }}>+ <div style={{ height: 420, width: 200, position: "relative" }}>+ <div style={{ position: "absolute", left: 0, right: 0, top: tops[i], height: hs[i] * k, background: cols[i], borderRadius: 14, opacity: 0.92 }} />+ <div style={{ position: "absolute", left: -40, right: -40, top: tops[i] - 80, textAlign: "center", fontFamily: NUM, fontSize: 70, fontWeight: 900, color: "#fff", opacity: k }}>{st[1]}</div>+ </div>+ <div style={{ fontSize: 36, color: C.gold, marginTop: 30, textAlign: "center", opacity: k }}>{st[0]}</div>+ </div>+ );+};+const Fall: React.FC<{ s: Sc }> = ({ s }) => (+ <AbsoluteFill>+ <BoardBg />+ <Panel x={panelX(s.pip, 1300)} y={150} w={1300} h={720}>+ <div style={{ display: "flex", gap: 90, alignItems: "flex-start", height: 520, marginTop: 20 }}>+ {s.steps.map((st: string[], i: number) => <FallBar key={i} st={st} at={s.stepsAt[i] - s.a} i={i} />)}+ </div>+ </Panel>+ <Pip kind={s.pip} a={s.a} />+ </AbsoluteFill>+);++/* ── assume:先 ?% 再揭晓。boxes[{label,v,hot?}](两个,中间减号)+ reveal(第二个晚 1.6 秒)+ result{label,v} + resultAt ── */+const Box: React.FC<{ label: string; v: string; at: number; hot?: boolean }> = ({ label, v, at, hot }) => {+ const k = useK(at, { damping: 12, stiffness: 140 });+ return (+ <div style={{ width: 420, height: 300, borderRadius: 24, background: hot ? "linear-gradient(180deg,#7A2232,#4A1424)" : "linear-gradient(180deg,#2B3F7A,#1C2950)", border: `3px solid ${C.gold2}`,+ display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center" }}>+ <div style={{ fontSize: 36, color: C.gold }}>{label}</div>+ <div style={{ fontFamily: NUM, fontSize: 120, fontWeight: 900, marginTop: 10, ...goldText, transform: `scale(${0.7 + 0.3 * k})` }}>{k > 0.05 ? v : "?%"}</div>+ </div>+ );+};+const Assume: React.FC<{ s: Sc }> = ({ s }) => {+ const kr = useK(s.resultAt - s.a);+ return (+ <AbsoluteFill>+ <BoardBg />+ <Panel x={panelX(s.pip, 1420)} y={130} w={1420} h={780}>+ <Tag t={s.tag ?? "重要假设"} />+ <div style={{ display: "flex", alignItems: "center", gap: 40 }}>+ <Box label={s.boxes[0].label} v={s.boxes[0].v} at={s.reveal - s.a} hot={s.boxes[0].hot} />+ <div style={{ fontSize: 120, color: C.gold }}>{s.op ?? "−"}</div>+ <Box label={s.boxes[1].label} v={s.boxes[1].v} at={s.reveal - s.a + 1.6} hot={s.boxes[1].hot ?? true} />+ </div>+ <div style={{ marginTop: 40, opacity: kr, transform: `translateY(${(1 - kr) * 30}px)`, display: "flex", alignItems: "baseline", gap: 24 }}>+ <span style={{ fontSize: 50, color: "#fff", fontWeight: 700 }}>{s.result.label}</span>+ <span style={{ fontFamily: NUM, fontSize: 120, fontWeight: 900, color: "#2A1A40", background: C.lime, padding: "0 30px", borderRadius: 18 }}>{s.result.v}</span>+ </div>+ </Panel>+ <Pip kind={s.pip} a={s.a} />+ </AbsoluteFill>+ );+};++/* ── formula:推导行逐行出现 title / lines[] + linesAt[](最后一行高亮) ── */+const Formula: React.FC<{ s: Sc }> = ({ s }) => (+ <AbsoluteFill>+ <BoardBg />+ <Panel x={panelX(s.pip, 1300)} y={150} w={1300} h={720}>+ <Title t={s.title} />+ <div style={{ alignSelf: "flex-start", marginLeft: 120, display: "flex", flexDirection: "column", gap: 34 }}>+ {s.lines.map((t: string, i: number) => <Pop key={i} at={s.linesAt[i] - s.a}><div style={{ fontSize: 76, fontWeight: 800, color: i === s.lines.length - 1 ? C.lime : "#fff" }}>{t}</div></Pop>)}+ </div>+ </Panel>+ <Pip kind={s.pip} a={s.a} />+ </AbsoluteFill>+);++/* ── big:上一行算式 top + 下一行结果 bottom(bottomAt 砸下) ── */+const Big: React.FC<{ s: Sc }> = ({ s }) => {+ const k = useK(s.bottomAt - s.a, { damping: 10, stiffness: 140 });+ return (+ <AbsoluteFill>+ <BoardBg />+ <Panel x={panelX(s.pip, 1300)} y={130} w={1300} h={800}>+ <Pop at={0.2}><div style={{ fontFamily: NUM, fontSize: 190, fontWeight: 900, ...goldText }}>{s.top}</div></Pop>+ <div style={{ fontFamily: NUM, fontSize: 260, fontWeight: 900, ...goldText, opacity: k, transform: `scale(${1.6 - 0.6 * k})`, lineHeight: 1.1 }}>{s.bottom}</div>+ </Panel>+ <Pip kind={s.pip} a={s.a} />+ </AbsoluteFill>+ );+};++/* ── stickers:四宫格 items[{t,img,at?,dim?}](img 在 public/stickers/,无 at 的开场就出) ── */+const Stickers: React.FC<{ s: Sc }> = ({ s }) => (+ <AbsoluteFill>+ <BoardBg />+ <div style={{ position: "absolute", left: 200, top: 120, display: "grid", gridTemplateColumns: "1fr 1fr", gap: 40 }}>+ {s.items.map((it: any, i: number) => <Pop key={i} at={it.at != null ? it.at - s.a : 0.2}>+ <div style={{ width: 720, height: 390, borderRadius: 28, background: "linear-gradient(180deg, rgba(70,48,112,.95), rgba(44,28,74,.95))", border: `3px solid ${it.dim ? C.line : C.gold2}`,+ display: "flex", alignItems: "center", justifyContent: "space-around", opacity: it.dim ? 0.45 : 1 }}>+ <div style={{ fontFamily: FONT, fontSize: 130, fontWeight: 900, ...goldText }}>{it.t}</div>+ {it.img && <Img src={staticFile(`stickers/${it.img}`)} style={{ width: 280, height: 280, objectFit: "contain" }} />}+ </div></Pop>)}+ </div>+ </AbsoluteFill>+);++/* ── bars:横向条形图 title / bars[[名,值]] + barsAt[] / unit / max / highlight(下标) ── */+const BarRow: React.FC<{ b: [string, number]; at: number; max: number; unit: string; hi: boolean }> = ({ b, at, max, unit, hi }) => {+ const k = useK(at);+ return (+ <div style={{ display: "flex", alignItems: "center", gap: 26 }}>+ <div style={{ width: 210, textAlign: "right", fontSize: 44, color: hi ? C.lime : "#fff", fontWeight: 700 }}>{b[0]}</div>+ <div style={{ height: 70, width: (b[1] / max) * 760 * k, borderRadius: 12, background: hi ? C.lime : C.gold2 }} />+ <div style={{ fontFamily: NUM, fontSize: 60, fontWeight: 900, color: "#fff", opacity: k }}>{b[1]} {unit}</div>+ </div>+ );+};+const Bars: React.FC<{ s: Sc }> = ({ s }) => {+ const max = s.max ?? Math.max(...s.bars.map((b: any) => b[1])) * 1.02;+ return (+ <AbsoluteFill>+ <BoardBg />+ <Panel x={panelX(s.pip, 1300)} y={150} w={1300} h={720}>+ <Title t={s.title} />+ <div style={{ display: "flex", flexDirection: "column", gap: 34, alignSelf: "flex-start", marginLeft: 90 }}>+ {s.bars.map((b: [string, number], i: number) => <BarRow key={i} b={b} at={s.barsAt[i] - s.a} max={max} unit={s.unit ?? ""} hi={i === s.highlight} />)}+ </div>+ </Panel>+ <Pip kind={s.pip} a={s.a} />+ </AbsoluteFill>+ );+};++/* ── formula2:公式逐项长出 title / terms[{t,label,img?,at}],最新一项高亮;final=1 全部同时亮 ── */+const Term: React.FC<{ tm: any; at: number; hot: boolean; first: boolean }> = ({ tm, at, hot, first }) => {+ const k = useK(at);+ return (+ <>+ {!first && <div style={{ fontSize: 90, color: C.gold, opacity: k, marginTop: 20 }}>+</div>}+ <div style={{ opacity: k, transform: `translateY(${(1 - k) * 30}px)`, display: "flex", flexDirection: "column", alignItems: "center", gap: 16 }}>+ <div style={{ fontFamily: NUM, fontSize: 120, fontWeight: 900, padding: "0 26px", borderRadius: 18, background: hot ? C.lime : "transparent", ...(hot ? { color: "#2A1A40" } : goldText) }}>{tm.t}</div>+ {tm.img && <Img src={staticFile(`stickers/${tm.img}`)} style={{ width: 130, height: 130, objectFit: "contain" }} />}+ <div style={{ fontSize: 30, color: C.dim }}>{tm.label}</div>+ </div>+ </>+ );+};+const Formula2: React.FC<{ s: Sc }> = ({ s }) => {+ const f = useCurrentFrame();+ const lastI = s.terms.reduce((acc: number, tm: any, i: number) => (f >= (tm.at - s.a) * FPS ? i : acc), 0);+ const w = s.pip === "rect-r" ? 1300 : 1440;+ return (+ <AbsoluteFill>+ <BoardBg />+ <Panel x={panelX(s.pip, w)} y={170} w={w} h={680}>+ <Title t={s.title} />+ <div style={{ display: "flex", alignItems: "flex-start", gap: 20 }}>+ {s.terms.map((tm: any, i: number) => <Term key={i} tm={tm} at={tm.at - s.a} hot={!s.final && i === lastI} first={i === 0} />)}+ </div>+ </Panel>+ <Pip kind={s.pip} a={s.a} />+ </AbsoluteFill>+ );+};++/* ── calc:算例填数 tag / row[](第 0 项开场就出,其余按 rowAt[i-1])/ res + resAt / extra + extraAt ── */+const Calc: React.FC<{ s: Sc }> = ({ s }) => {+ const kr = useK(s.resAt - s.a, { damping: 12, stiffness: 140 });+ const ke = useK((s.extraAt ?? s.b + 9) - s.a);+ const parts = s.row.filter((x: string) => x);+ return (+ <AbsoluteFill>+ <BoardBg />+ <Panel x={panelX(s.pip, 1300)} y={150} w={1300} h={720}>+ {s.tag && <Tag t={s.tag} />}+ <div style={{ display: "flex", alignItems: "baseline", gap: 18, flexWrap: "wrap", justifyContent: "center", maxWidth: 1180 }}>+ {parts.map((p: string, i: number) => <Pop key={i} at={s.rowAt ? (i === 0 ? s.rowAt[0] - s.a - 0.3 : s.rowAt[i - 1] - s.a) : 0.3 + i * 0.4}>+ <span style={{ fontFamily: NUM, fontSize: 84, fontWeight: 900, color: i === 0 ? C.gold : "#fff" }}>{p}</span></Pop>)}+ </div>+ <div style={{ height: 3, width: 900, background: C.line, margin: "34px 0" }} />+ <div style={{ fontFamily: NUM, fontSize: 130, fontWeight: 900, color: "#2A1A40", background: C.lime, padding: "0 40px", borderRadius: 20, opacity: kr, transform: `scale(${1.3 - 0.3 * kr})` }}>{s.res}</div>+ {s.extra && <div style={{ fontSize: 48, color: "#fff", marginTop: 28, opacity: ke }}>{s.extra}</div>}+ </Panel>+ <Pip kind={s.pip} a={s.a} />+ </AbsoluteFill>+ );+};++export const MAP: Record<string, React.FC<{ s: Sc }>> = { host: Host, broll: Broll, board: Board, rates: Rates, curve: Curve, fall: Fall, assume: Assume, formula: Formula, big: Big, stickers: Stickers, bars: Bars, formula2: Formula2, calc: Calc };++const Sub: React.FC<{ t: number }> = ({ t }) => {+ const s = (cues as any).subs.find((x: any) => t >= x.a && t < x.b);+ if (!s) return null;+ return (+ <div style={{ position: "absolute", left: 0, right: 0, bottom: 56, display: "flex", justifyContent: "center" }}>+ <div style={{ fontFamily: FONT, fontSize: 52, fontWeight: 600, color: "#fff", padding: "4px 20px", textShadow: "0 0 3px rgba(0,0,0,.9), 0 2px 6px rgba(0,0,0,.75), 0 0 18px rgba(0,0,0,.4)" }}>{s.t}</div>+ </div>+ );+};++export const Lin: React.FC = () => {+ const f = useCurrentFrame(); const { fps } = useVideoConfig();+ return (+ <AbsoluteFill style={{ background: "#000" }}>+ <OffthreadVideo src={staticFile("main.mp4")} muted style={{ width: "100%", height: "100%" }} />+ <Audio src={staticFile(AUDIO)} />+ {((plan as any).scenes as Sc[]).map((s, i) => {+ const Comp = MAP[s.type];+ const from = Math.round(s.a * FPS), dur = Math.max(1, Math.round(s.b * FPS) - from);+ return <Sequence key={i} from={from} durationInFrames={dur} layout="none"><AbsoluteFill><Comp s={s} /></AbsoluteFill></Sequence>;+ })}+ {DISCLOSURE && <div style={{ position: "absolute", right: 36, top: 30, fontFamily: FONT, fontSize: 20, color: "rgba(255,255,255,0.85)", background: "rgba(0,0,0,0.3)", padding: "5px 12px", borderRadius: 8 }}>{DISCLOSURE}</div>}+ <Sub t={f / fps} />+ </AbsoluteFill>+ );+};diff --git a/skills/digital-human-koubo/templates/lin-169/src/Root.tsx b/skills/digital-human-koubo/templates/lin-169/src/Root.tsxnew file mode 100644index 0000000..5698b79--- /dev/null+++ b/skills/digital-human-koubo/templates/lin-169/src/Root.tsx@@ -0,0 +1,8 @@+import React from "react";+import { Composition } from "remotion";+import { Lin } from "./Lin";+import plan from "./scenes.json";++export const Root: React.FC = () => (+ <Composition id="Lin" component={Lin} durationInFrames={Math.round((plan as any).total * 30)} fps={30} width={1920} height={1080} />+);diff --git a/skills/digital-human-koubo/templates/lin-169/src/cues.json b/skills/digital-human-koubo/templates/lin-169/src/cues.jsonnew file mode 100644index 0000000..85c03ca--- /dev/null+++ b/skills/digital-human-koubo/templates/lin-169/src/cues.json@@ -0,0 +1,95 @@+{+"subs": [+{+"a": 0,+"b": 1.24,+"t": "存一笔钱"+},+{+"a": 1.29,+"b": 3.05,+"t": "多久能翻一倍?"+},+{+"a": 3.1,+"b": 6.15,+"t": "有个特别好用的心算方法"+},+{+"a": 6.2,+"b": 8.14,+"t": "它叫72法则"+},+{+"a": 8.19,+"b": 9.28,+"t": "用72"+},+{+"a": 9.33,+"b": 11.55,+"t": "除以年化收益率"+},+{+"a": 11.6,+"b": 13.36,+"t": "比如年化6%"+},+{+"a": 13.41,+"b": 14.92,+"t": "72除以6"+},+{+"a": 14.97,+"b": 16.22,+"t": "等于12"+},+{+"a": 16.27,+"b": 18.55,+"t": "大约12年翻一倍"+},+{+"a": 18.6,+"b": 20.22,+"t": "年化2%呢?"+},+{+"a": 20.27,+"b": 21.61,+"t": "要36年"+},+{+"a": 21.66,+"b": 23.0,+"t": "差几个点"+},+{+"a": 23.05,+"b": 24.95,+"t": "差的是半辈子"+},+{+"a": 25.0,+"b": 28.27,+"t": "所以别小看那一两个点的收益"+},+{+"a": 28.32,+"b": 31.35,+"t": "也别小看每年扣掉的手续费"+},+{+"a": 31.4,+"b": 34.5,+"t": "你的钱现在按什么速度在长?"+},+{+"a": 34.55,+"b": 35.95,+"t": "评论区聊聊"+}+],+"total": 36.0+}\ No newline at end of filediff --git a/skills/digital-human-koubo/templates/lin-169/src/index.ts b/skills/digital-human-koubo/templates/lin-169/src/index.tsnew file mode 100644index 0000000..e20ec58--- /dev/null+++ b/skills/digital-human-koubo/templates/lin-169/src/index.ts@@ -0,0 +1,3 @@+import { registerRoot } from "remotion";+import { Root } from "./Root";+registerRoot(Root);diff --git a/skills/digital-human-koubo/templates/lin-169/src/scenes.json b/skills/digital-human-koubo/templates/lin-169/src/scenes.jsonnew file mode 100644index 0000000..583628f--- /dev/null+++ b/skills/digital-human-koubo/templates/lin-169/src/scenes.json@@ -0,0 +1,107 @@+{+"total": 36.0,+"config": {+"face": [+1215,+390+],+"audio": "mix.wav",+"disclosure": "内容由 AI 数字人演绎",+"brollTag": "AI 生成画面"+},+"scenes": [+{+"type": "host",+"a": 0,+"b": 3.4,+"depth": {+"src": "cut/s01.webm",+"lines": [+"翻倍"+],+"at": 1.6+}+},+{+"type": "board",+"a": 3.4,+"b": 6.2,+"tag": "想一想",+"title": "存一笔钱",+"big": [+"多久翻一倍?"+],+"pip": "rect-r"+},+{+"type": "big",+"a": 6.2,+"b": 11.6,+"top": "72 法则",+"bottom": "72 ÷ 年化",+"bottomAt": 8.4,+"pip": "rect-r"+},+{+"type": "calc",+"a": 11.6,+"b": 18.6,+"tag": "年化 6%",+"row": [+"72",+"÷ 6"+],+"rowAt": [+13.2,+14.0+],+"res": "≈ 12 年翻倍",+"resAt": 15.6,+"pip": "rect-r"+},+{+"type": "bars",+"a": 18.6,+"b": 25.0,+"title": "翻一倍要多少年",+"bars": [+[+"年化 6%",+12+],+[+"年化 2%",+36+]+],+"barsAt": [+18.8,+20.6+],+"unit": "年",+"highlight": 1,+"pip": "rect-r"+},+{+"type": "broll",+"a": 25.0,+"b": 31.4,+"clip": "B01",+"chips": [+"收益率:多 1–2 个点",+"手续费:每年扣一点"+],+"chipsAt": 26.2,+"pip": "circle-bl"+},+{+"type": "host",+"a": 31.4,+"b": 36.0,+"lower": [+"你的钱",+"按什么速度在长?"+]+}+]+}\ No newline at end of filediff --git a/skills/digital-human-koubo/templates/lin-169/tsconfig.json b/skills/digital-human-koubo/templates/lin-169/tsconfig.jsonnew file mode 100644index 0000000..aad5670--- /dev/null+++ b/skills/digital-human-koubo/templates/lin-169/tsconfig.json@@ -0,0 +1,15 @@+{+ "compilerOptions": {+ "target": "ES2022",+ "module": "ESNext",+ "moduleResolution": "bundler",+ "jsx": "react-jsx",+ "strict": true,+ "skipLibCheck": true,+ "resolveJsonModule": true,+ "esModuleInterop": true,+ "noEmit": true,+ "types": ["react"]+ },+ "include": ["src", "storyboard.json"]+}