fix: AI数字人「我的音色」克隆音色试听改用 TTS 合成 #1815
Reference in New Issue
Block a user
Delete Branch "fix/ai-avatar-clone-preview-tts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题
用户反馈:配音库「我的克隆」里能听到克隆音色声音,但 AI 数字人页面同一音色点试听无反应。
根因
useAudioPlayer.playVoice()→POST /tts/preview现合成示例文案再播放(因为 clone 的preview_url/audio_url都为空)PanelVoiceSelector.handlePreview停留在voice.preview_url || voice.audio_url直链播放,clone 音色 URL 为空时静默返回修复
previewTts({text, voice_id, speed}),与配音库完全一致voiceId内存缓存合成结果,同一音色二次试听不重复合成preview_url/audio_url直链播放(不改)playAudioUrl,保留原onended/onerror/play().catch错误提示(含「该音色暂无试听音频」兜底)不动
验证
🚀 预览环境已部署
🗑️ 预览环境已清理
PR #1815 已关闭或合并,对应的预览环境已被清理。