Generate Narration Audio
Documentsgenerate-narration-audioGenerate Narration Audio is an Agent Skill for documents published in the ArcReel/ArcReel repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
为说书模式剧本逐段生成旁白配音(TTS)。当用户说"生成旁白"、"配音"、"生成全集旁白"、想重新生成某段配音、或批量配音中断需要补齐时使用。
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/ArcReel/ArcReel/blob/HEAD/agent_runtime_profile/.claude/skills/generate-narration-audio/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/generate-narration-audio, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
生成旁白配音
为说书(narration)模式剧本的每个片段,以该段 novel_text 原文合成一段旁白音频,
写回该段 generated_assets.narration_audio(输出 audio/segment_{segment_id}.wav)。
只依赖剧本,不依赖分镜图/视频——剧本生成后即可推进。
工具调用
重要:生成旁白配音必须调用下列 MCP 工具入队。此 skill 不提供任何 Python/Shell 脚本,不得用 BASH 调 python .../scripts/*.py。
通过 MCP 工具入队:
| 操作 | 工具 |
|---|---|
| 全集补齐(默认,所有缺音频的段) | mcp__arcreel__generate_narration_audio({"script": "episode_1.json"}) |
| 指定批量范围 | mcp__arcreel__generate_narration_audio({"script": "episode_1.json", "segment_ids": ["E1S01", "E1S02"]}) |
| 单段重生 | mcp__arcreel__generate_narration_audio({"script": "episode_1.json", "segment_ids": ["E1S05"]}) |
选择规则:不传
segment_ids则只为缺narration_audio的段入队;显式传入的段即使已有音频也会重新合成(用于换音色/语速后重生)。依赖:generation worker 必须在线(audio 独立通道);audio 供应商、模型与全局默认音色/语速由用户在 Web 设置页配置。
项目级音色/语速覆盖:用户要求"这个项目旁白用 X 音色 / 语速 1.2"时,调
mcp__arcreel__patch_project({"settings": {"narration_voice": "X", "narration_speed": 1.2}})写项目级覆盖(优先于全局设置,只影响当前项目;传null清除回退全局)。改完后对已生成的段重新合成才会生效。
工作流程
- 状态检测 — 读取剧本,检查各段
generated_assets.narration_audio,统计缺失段并告知用户 - 入队生成 — 调用 MCP 工具,任务经生成队列由 worker 处理,工具等待全部完成后返回逐段结果
- 汇报 — 汇总成功/失败明细展示给用户
断点续传
中断(服务重启、任务失败、会话断开)后重新调用不传 segment_ids 的全集补齐即可:
已有音频的段自动跳过,只补缺失段,不重复扣费。
错误处理
- 单段失败不影响批次,工具返回逐段结果
- 失败段用
segment_ids精确重试 - 工具提示未配置 audio 供应商时,引导用户到 Web 设置页配置后重试