
OpenMontage avatar-video 实战为 HeyGen 数字人视频编写脚本——语速估算、Break 停顿标签与多场景结构【免费下载链接】OpenMontageWorlds first open-source, agentic video production system. 12 production pipelines, 100 tools, 700 agent skill and production-knowledge files. Turn your AI coding assistant into a full video production studio.项目地址: https://gitcode.com/GitHub_Trending/op/OpenMontage本文基于 OpenMontage 仓库中avatar-video技能的核心参考文档 scripts.md系统讲解如何为 HeyGen AI 数字人Avatar视频编写自然、可控、渲染稳定的口播脚本。读完本文你可以掌握 150 词/分钟的时长估算方法、SSML 风格break停顿标签的完整语法规则与时长选择标准并能直接套用产品演示、教程、公告三类脚本模板完成单场景与多场景数字人视频的文案工程。1. 脚本在 avatar-video 工作流中的位置OpenMontage 的avatar-video技能围绕 HeyGen 的/v2/video/generateAPI 构建SKILL.md 中定义的默认工作流为五步列出头像—GET /v2/avatars选择 avatar 并记录avatar_id与default_voice_id列出语音如需要 —GET /v2/voices选择与头像性别、语言匹配的 voice编写脚本— 组织场景结构每个场景承载一个概念本文主题生成视频— 按场景提交头像、语音、脚本与背景轮询状态—GET /v2/videos/{video_id}直到状态为completed。也就是说脚本写作处于素材选型之后、云端生成之前的关键环节它直接决定视频时长、节奏与可理解性而一次云端生成通常需要 5–15 分钟脚本错误在生成后才能暴露返工成本很高。因此在 OpenMontage 的生产流水线中这一步由专职角色负责——avatar-spokesperson 管线的 Script Director 明确要求为口语而写而非为幻灯片而写短句子、直接动词、每拍一个观点、显式转场并规定读起来像宣传册的文案必须重写。这与 scripts.md 的核心原则完全一致AI 数字人的脚本与真人出镜脚本的需求不同需要在文本层面就为 TTS 合成做优化。2. 语速与时长150 词/分钟估算模型2.1 基准语速表脚本时长的规划基线是正常语速speed 1.0x约为 150 词/分钟。原文档以此作为粗略估计基准给出如下对应表脚本词数大致时长75 词30 秒150 词1 分钟300 词2 分钟450 词3 分钟750 词5 分钟2.2 时长与帧数估算函数scripts.md 提供了两个 TypeScript 工具函数由脚本估算视频秒数以及换算为 Remotion 帧数默认 30 fps// Estimate video duration from script function estimateDuration(script: string, speed: number 1.0): number { const words script.split(/\s/).filter(w w.length 0).length; const wordsPerMinute 150 * speed; return words / wordsPerMinute * 60; // seconds } // Estimate frames for Remotion function estimateFrames(script: string, fps: number 30, speed: number 1.0): number { const durationSeconds estimateDuration(script, speed); return Math.ceil(durationSeconds * fps); }两个实现细节值得注意分词用\s空白切分并过滤空串因此break time1s/这类标签会被计为一个词实际估时长时应以纯口播文本为准或将标签先行剔除speed 参数直接线性缩放词速150 * speed这与 HeyGen 的speed字段语义一致——video-generation.md 的 voice 字段表确认speed取值范围为0.5–2.0默认 1.0。这一 150 词/分钟的估算基线在仓库中是贯穿一致的remotion-integration.md 在讲解并行开发工作流时同样给出wordCount / 150 * 60 * fps的近似帧数公式用于在 HeyGen 视频生成完成10–15 分钟以上之前先把 Remotion 组合的durationInFrames定下来。3. 句式结构与标点控制3.1 短句优先AI 语音对短句的处理更自然。原文档给出的量化标准准则示例好每句 10–20 词Our platform helps teams collaborate. It syncs in real-time across all devices.避免30 词以上的连句Our platform helps teams collaborate more effectively by providing real-time synchronization across all devices while also offering offline support and automatic conflict resolution.3.2 标点即韵律标点符号直接参与 TTS 的韵律生成scripts.md 将其归纳为标点效果句号.完整停句自然停顿逗号,短暂停顿问号?语调上扬感叹号!强调应少用省略号...语气拖尾轻微停顿这意味着写作时可以用标点导演语音在需要换气的地方落逗号在需要悬念处用省略号把真正需要强调的结论句以句号收尾。4. 使用break标签精确控制停顿4.1 标签语法HeyGen 支持 SSML 风格的break标签实现精确停顿break timeXs/其中X为秒数如0.5s、1s、1.5s、2s。四条硬性格式规则规则正确写法错误写法标签前留空格word break time1s/wordbreak time1s/标签后留空格break time1s/ wordbreak time1s/word秒数带 s 后缀break time1.5s/break time1500ms/自闭合标签break time1s/break time1s/break这些规则在 voices.md 中同样被列为 break 标签的强制要求Must have space before/after tag两处文档互为印证。一个容易被忽视的前置条件GET /v2/voices返回的每个 voice 对象都带有support_pause布尔字段见 voices.md 的响应格式在写依赖break的脚本前应确认所选 voice 支持停顿否则标签可能不生效。4.2 停顿时长选择标准场景建议停顿示例问候语之后0.5–1sHello! break time0.5s/ Welcome to...章节之间1–1.5s...thats feature one. break time1.5s/ Now lets look at...关键点之前0.5sThe most important thing is break time0.5s/ consistency.戏剧效果1.5–2sAnd the winner is... break time2s/ you!提问之后1sSound good? break time1s/ Lets get started.列举条目之间0.5sFirst, speed. break time0.5s/ Second, reliability.按时长的听感分级时长听感适用0.3–0.5s短促换气分句之间、轻量强调0.5–1s自然停顿句子断开、转场1–1.5s刻意停顿章节切换、为关键点铺垫1.5–2s戏剧化揭晓、重要宣布2s 以上长停顿慎用容易显得不自然4.3 完整脚本示例原文档给出三段可直接复用的脚本片段分别覆盖转场、悬念与列举节奏// Section transitions const script Welcome to our product overview. break time1s/ Today Ill cover three key features. break time0.5s/ First, lets look at the dashboard. break time1.5s/ As you can see, its designed for simplicity. break time0.5s/ Every action is just one click away. ; // Building suspense const announcement Weve been working on something special. break time1s/ After months of development... break time1.5s/ Im excited to announce break time0.5s/ our new AI assistant. ; // List with rhythm const features Our platform offers three core benefits. break time0.5s/ Speed. break time0.5s/ Reliability. break time0.5s/ And simplicity. break time1s/ Let me show you each one. ;注意模板字符串中的空行它们只影响源码可读性口播文本由分词规则处理真正决定停顿的是标签本身。4.4 连续 break 的合并规则多个相邻的break会被合并为一次总时长停顿而不是叠加两次处理// These two breaks: Hello break time\1s\/ break time\0.5s\/ world // Are treated as a single 1.5s pause这一行为在 voices.md 的 Consecutive Breaks 小节有相同描述Multiple consecutive break tags are automatically combined可作为稳定行为理解。5. 脚本结构模板原文档按视频时长给出三类带占位符的完整模板均内置 break 标签可直接替换[...]占位后使用。5.1 产品演示60 秒约 150 词const productDemo Hi, Im [Name], and Im excited to show you [Product]. break time1s/ [Product] helps you [main benefit] in just [timeframe]. break time0.5s/ Heres how it works. break time1s/ First, [step 1]. break time0.5s/ Then, [step 2]. break time0.5s/ And finally, [step 3]. break time1s/ What used to take [old time] now takes [new time]. break time0.5s/ Ready to get started? break time0.5s/ Visit [website] today. ;结构是自我介绍 → 核心利益 → 三步用法 → 前后对比 → CTA与 Script Director 推荐的 hook / value / proof / CTA 分段逻辑一致。5.2 教程引言90 秒约 225 词const tutorial Welcome to this tutorial on [topic]. break time0.5s/ Im [Name], and Ill guide you through everything you need to know. break time1s/ By the end of this video, youll be able to [outcome 1], [outcome 2], and [outcome 3]. break time1s/ Lets start with the basics. break time1.5s/ [Section 1 content - 2-3 sentences] break time1s/ Now that you understand [concept], lets move on to [next topic]. break time1.5s/ [Section 2 content - 2-3 sentences] break time1s/ And finally, lets cover [last topic]. break time1.5s/ [Section 3 content - 2-3 sentences] break time1s/ Thats everything you need to get started. break time0.5s/ If you have questions, leave a comment below. break time0.5s/ Thanks for watching! ;注意章节间统一使用 1.5s 的刻意停顿对应 4.2 表中章节切换档而段落内部用 0.5–1s。5.3 公告30 秒约 75 词const announcement Big news! break time0.5s/ Were thrilled to announce [announcement]. break time1s/ This means [benefit 1] and [benefit 2] for all our users. break time0.5s/ Starting [date], youll be able to [new capability]. break time1s/ Head to [location] to learn more. break time0.5s/ We cant wait to hear what you think! ;6. 面向 AI 语音的写作规范6.1 应该做口语化写作—— 大声朗读一遍检验流畅度使用缩略形式—— Were 而非 We areIts 而非 It is拆分长句—— 在自然停顿点断开拼写展开缩写—— API 可能被读成 a pee eye用停顿制造强调—— 引导听者注意力明确收尾每个章节—— 不要在思路中途淡出。6.2 应避免无上下文的行话—— 技术术语需要解释冗长的插入语—— 拆成独立句子发音歧义词—— 如 read现在时 / 过去时过量感叹号—— 全文通常一个就够连珠炮长句—— 拆成可消化的小块信息密度过高—— 用停顿把事实拉开间距。6.3 发音提示技巧对可能被误读的词采用音素展开或括号注音的方式写入脚本// Technical terms const script1 Our API (A-P-I) handles authentication...; // Ambiguous words const script2 I read (red) the documentation yesterday...; // Brand names const script3 Welcome to HeyGen (hey-jen)...;这与仓库中voice-performance-director技能的做法一致——voice-performance-director.md 在供应商脚本中也直接内嵌了break time0.6s/这类停顿标记说明文本即表演指令是该仓库统一的脚本工程思路。7. 多场景脚本当脚本跨场景切分用于不同背景或不同 avatar时每个场景对应video_inputs数组中的一个对象脚本写在各场景自己的input_text中const multiSceneVideo { video_inputs: [ { // Scene 1: Introduction character: { type: avatar, avatar_id: josh_lite3_20230714, avatar_style: normal }, voice: { type: text, input_text: Welcome to our quarterly update. break time\1s\/ Im Josh, and Ill walk you through the highlights., voice_id: voice_id_here, }, background: { type: color, value: #1a1a2e }, }, { // Scene 2: Main content (different background) character: { type: avatar, avatar_id: josh_lite3_20230714, avatar_style: normal }, voice: { type: text, input_text: Lets start with revenue. break time\0.5s\/ We grew 25 percent quarter over quarter. break time\1s\/ Heres what drove that growth., voice_id: voice_id_here, }, background: { type: image, url: https://... }, }, // ... more scenes ], };请求结构中video_inputs为 1–50 个场景的数组input_text在voice.type为text时必填——这些字段约束与 video-generation.md 的 Request Fields 表一致。场景转场的四条写作建议每个场景以完整的意思结尾不要在场景边界切断句子新场景以简短上下文开场让听者快速定位全片保持语气一致场景开头使用停顿给画面新背景留出被看见的时间。最后一条在多场景模板中可以直接看到Scene 2 的input_text在主题句后紧跟 0.5s 停顿正是为了给背景切换留出听觉空间。8. 生成前的脚本测试在提交完整视频生成任务前原文档给出四步检查清单大声朗读—— 计时并检查拗口表达数词—— 用第 2 节的 150 词/分钟模型验证预期时长检查 break 标签—— 确认前后空格与语法4.1 节四条规则短片段预览—— 对发音没把握时先生成一段约 10 秒的测试视频。对应的测试代码取脚本前两句用 720p 低分辨率生成更快、更省资源// Test a small portion first const testScript script.split(.).slice(0, 2).join(.) .; const testVideoId await generateVideo({ video_inputs: [{ character: { type: avatar, avatar_id: avatarId, avatar_style: normal }, voice: { type: text, input_text: testScript, voice_id: voiceId }, }], dimension: { width: 1280, height: 720 }, // Lower res for test });补充两点仓库内的配套实践video-generation.md 指出请求顶层支持test: true测试模式输出带水印、不消耗 credit可叠加使用而 remotion-integration.md 建议开发时用 avatar 的preview_video_url短视频占位与正式生成任务并行推进。9. 语速调节speed 参数语速在 voice 配置中通过speed字段调节voice: { type: text, input_text: script, voice_id: voice_id, speed: 1.1, // Slightly faster (range: 0.5 - 2.0) }语速效果适用场景0.8–0.9更慢、更从容复杂主题、年长受众1.0正常通用1.1–1.2稍快有活力的内容、年轻受众1.3 以上快慎用可能牺牲清晰度从源码结构看speed的有效范围0.5–2.0默认 1.0由 video-generation.md 的 voice 字段表定义同一字段表还定义了pitch-20 到 20默认 0但 scripts.md 只覆盖speed——更完整的语音配置语言过滤、性别匹配、support_pause/emotion_support特性筛选、自定义音频替代 TTS 等应参照 voices.md。10. 小结与延伸阅读scripts.md 给出的是一套文本层导演术以 150 词/分钟规划时长用短句和标点控制基础韵律用break标签叠加精确停顿用占位符模板快速产出 30–90 秒的成片脚本再用小片段预览和speed微调兜底。把它放回 avatar-video 技能 的整体工作流中脚本写作是连接选头像、选语音与生成、轮询之间的核心创作环节也是多场景视频能否自然衔接的决定因素。相关文档索引SKILL.md — avatar-video 技能总览与五步工作流voices.md — 语音列表、speed/pitch、break 规则、自定义音频video-generation.md —/v2/video/generate请求字段与脚本长度限制remotion-integration.md — 由脚本帧数估算驱动 Remotion 组合时长Script Director — 生产流水线中的脚本质量门槛【免费下载链接】OpenMontageWorlds first open-source, agentic video production system. 12 production pipelines, 100 tools, 700 agent skill and production-knowledge files. Turn your AI coding assistant into a full video production studio.项目地址: https://gitcode.com/GitHub_Trending/op/OpenMontage创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考