feat(skills): 完善视频生产 pipeline 及新增健身跟练账号
- SKILL.md: 新增工作流阶段定义、质量卡点、分镜规则 - manifest-schema.md: 补充完整字段规范及类型定义 - phase-tts.js: 优化 TTS 合成长逻辑,添加进度追踪 - capcut-tracks.js: 扩展轨道构建能力,支持更多元素类型 - capcut-timeline.js: 改进时间线生成,支持淡入淡出 - capcut_assemble.js: 新增 assemble 阶段完整实现 - cmd-init.js: 完善 init 命令逻辑 - qwen-tts.js: 调整超时配置 - accounts/禁忌帝王学: 更新拆分/图像/台词提示词 - accounts/健身跟练: 新增账号含 account.json 及全套提示词模板 - 新增 workflow-issues-20260501.md 参考文档 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -72,6 +72,28 @@ function initManifest(options) {
|
||||
console.log(` ⚠ ${refsWithoutUrl.length} 个参考图缺少 OSS URL,images 阶段会自动上传`)
|
||||
}
|
||||
|
||||
// 从 videoModel 推算固定时长(秒)
|
||||
const videoModelFixedDurations = {
|
||||
'kling': 6,
|
||||
'kling-v2-5-turbo': 6,
|
||||
'veo3-fast': 8,
|
||||
'veo3-fast-frames': 8,
|
||||
'grok-video-3': 6,
|
||||
}
|
||||
const estimatedVideoDuration = videoModelFixedDurations[options.videoModel || accountConfig.videoModel] || 6
|
||||
|
||||
// 校验时长约束
|
||||
for (let i = 0; i < rawItems.length; i++) {
|
||||
const item = rawItems[i]
|
||||
const dur = Number(item.duration) || 5
|
||||
if (dur > estimatedVideoDuration) {
|
||||
console.error(`错误: items[${i}] 的 TTS 估算 duration=${dur}s > videoModel 固定时长 ${estimatedVideoDuration}s`)
|
||||
console.error(` 必须先拆分 shot 再执行 init!`)
|
||||
console.error(` script: "${item.script}"`)
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
// 构建 items
|
||||
const items = rawItems.map((raw, i) => {
|
||||
const slug = slugify(raw.shotDesc || raw.script || `scene_${i + 1}`)
|
||||
@@ -81,7 +103,8 @@ function initManifest(options) {
|
||||
file: `images/scene_${String(i + 1).padStart(2, '0')}_${slug}.jpeg`,
|
||||
shotDesc: raw.shotDesc || '',
|
||||
script: raw.script || '',
|
||||
duration: raw.duration || 5,
|
||||
duration: Number(raw.duration) || 5,
|
||||
estimatedVideoDuration,
|
||||
imagePrompt: raw.imagePrompt,
|
||||
confirmed: false,
|
||||
}
|
||||
@@ -102,8 +125,10 @@ function initManifest(options) {
|
||||
references,
|
||||
...(accountConfig.ttsVoice ? { ttsVoice: accountConfig.ttsVoice } : {}),
|
||||
...(accountConfig.ttsInstruction ? { ttsInstruction: accountConfig.ttsInstruction } : {}),
|
||||
...(accountConfig.ttsRate ? { ttsRate: accountConfig.ttsRate } : {}),
|
||||
// 铁律:ttsRate 写死 1.15x,不允许配置覆盖(除非显式传入)
|
||||
ttsRate: options.ttsRate || 1.15,
|
||||
items,
|
||||
estimatedVideoDuration, // 顶层冗余,便于 assemble 直接读取
|
||||
}
|
||||
|
||||
// 创建输出目录(自增序号)
|
||||
|
||||
Reference in New Issue
Block a user