feat(capcut): 优化音频/字幕添加策略并重构语音切分逻辑

- 音频和字幕 API 调用改为先批量添加,批量失败时逐个兜底
- 重写 `splitIntoAudioSegments`,基于原始标点保留切分,合并短片段
- `qwen-tts.js` 补充中文逗号作为句末标点判断
This commit is contained in:
2026-05-06 23:21:40 +08:00
parent 6eec0e8889
commit b309f54430
4 changed files with 94 additions and 117 deletions

View File

@@ -173,7 +173,7 @@ async function assemble(args) {
if (items.length === 0) throw new Error('没有可用的素材文件')
// ffprobe 测量实际时长
// 测量实际时长
let audioMeasured = 0, videoMeasured = 0
for (const item of items) {
if (item.audio && !item.audio.startsWith('http')) {