feat(video-from-script): 添加 TTS 音色管理和解析功能

- 在 config.json 中添加 `ttsVoices` 音色库,支持音色名称到 ID 的映射
- 实现 `resolveVoice` 函数,将音色名称解析为实际 ID
- 更新账号系统和批量管道,支持通过音色名称配置 TTS 语音
- Excel 导入和 CLI 参数新增音色字段,支持按行指定不同音色
This commit is contained in:
2026-05-08 23:53:37 +08:00
parent 4a15e38169
commit 18fce1b5a1
12 changed files with 66 additions and 25 deletions

View File

@@ -116,7 +116,7 @@ digraph creation_flow {
| # | 问题 | 默认值 | 说明 |
|---|------|--------|------|
| 12 | TTS 音色? | config.json 全局 ttsVoice | account.json 的 ttsVoice,留空用全局默认 |
| 12 | TTS 音色? | config.json 全局 ttsVoice | account.json 的 ttsVoice。从 config.json 的 `ttsVoices` 音色库中选择(如"斯内普"、"布拉德"),也可直接填音色 ID |
| 13 | TTS 语气指令? | 无 | account.json 的 ttsInstruction描述期望的语气风格 |
| 14 | 背景音乐偏好? | 无 | account.json 的 capcut.defaultBGM。提供 URL 或描述风格Agent 辅助查找 |

View File

@@ -49,7 +49,7 @@ accounts/ # 项目根目录下
]
}
},
"ttsVoice": "cosyvoice-v3.5-plus-bailian-xxx",
"ttsVoice": "斯内普",
"ttsInstruction": "用冷静理性的男性声音朗读,语速适中",
"storyboardPrompt": "prompts/分镜.md",
"imageStylePrompt": "prompts/图片提示词.md",
@@ -108,7 +108,7 @@ accounts/ # 项目根目录下
| `videoModel` | string | 默认视频模型(`veo3-fast` / `grok-video-3` / `kling` |
| `batchSize` | number | 默认批量生成数量 |
| `styles` | object | 命名风格预设,每项含 `references` 数组 |
| `ttsVoice` | string | TTS 音色 ID留空用 config.json 全局默认 |
| `ttsVoice` | string | TTS 音色名称(如"斯内普")或音色 ID留空用 config.json 全局默认。可用音色见 config.json 的 `ttsVoices` |
| `ttsInstruction` | string | TTS 语气指令(描述期望的语气、语速、情感) |
| `storyboardPrompt` | string | 分镜提示词模板路径(相对于账号目录) |
| `imageStylePrompt` | string | 图片提示词模板路径(相对于账号目录) |