fix(#549): 预设配音无声 - 顶层voice_id+custom_text与tts配置路径不匹配 (#626)
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Successful in 32s
CI/CD Pipeline / Build Staging API Image (push) Successful in 3m33s
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 3m53s
CI/CD Pipeline / Frontend Lint (push) Successful in 4m33s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m57s
CI/CD Pipeline / Unit Tests (push) Successful in 5m4s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 7m3s
CI/CD Pipeline / Integration Tests (push) Successful in 2m36s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 46s
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (push) Has been cancelled

Co-authored-by: xiaoxia <dev@xiaoxiajianji.com>
Co-committed-by: xiaoxia <dev@xiaoxiajianji.com>
This commit was merged in pull request #626.
This commit is contained in:
2026-07-20 12:19:38 +08:00
committed by auto-approve-bot
parent 82929fcd10
commit dc12d4669f
2 changed files with 155 additions and 0 deletions
@@ -675,6 +675,27 @@ class UnifiedRenderService:
config = self.plan.config or {}
tts_cfg = config.get("tts", {}) or {}
# 兼容前端顶层字段:voice_id / custom_text / voice_clone_profile_id
# 前端一键生成页面传 config.voice_id + config.custom_text
# 统一渲染引擎从 config.tts 读,这里做桥接映射。
if not tts_cfg.get("enabled"):
top_voice_id = config.get("voice_id", "") or ""
top_text = config.get("custom_text", "") or ""
if top_voice_id and top_text:
tts_cfg = {
"enabled": True,
"voice_id": top_voice_id,
"text": top_text,
"align_mode": "full",
"overlap_mode": "replace",
}
logger.info(
"[unified-render] 检测到顶层 voice_id+custom_text,桥接到 tts 配置: plan_id=%s voice_id=%s text_len=%d",
self.plan.id,
top_voice_id,
len(top_text),
)
tts_config = TtsConfig.parse(tts_cfg)
if not tts_config.enabled:
return False