feat(web): TTS配音情感风格选择器 #2000
Reference in New Issue
Block a user
Delete Branch "feat/tts-emotion-style"
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?
改动概述
在所有TTS配音入口新增「配音风格」选择器,支持6种预设风格。
风格预设
改动范围
新增
src/api/tts/styles.ts— TTS_STYLE_OPTIONS 常量 + TtsStyle 类型 + DEFAULT_TTS_STYLE + getTtsStyle() 容错查找src/components/voice/TtsStyleSelector/index.tsx— 共享风格选择器组件,支持 compact(3列小按钮)和 normal(3列卡片)两种模式,紫色主题 (#7c3aed)修改
api/tts/types.ts:TTSSynthesizeRequest、TTSPreviewRequest 加style?: stringapi/template-editor/types.ts:SegmentTtsConfig 加style?: string(为剪辑规划器TtsPanel预留,UI尚未开发)pages/ai-avatar/api/aiAvatar.ts:previewTts、createLipsyncJob 加style?: string设计要点
style?: string),未传时后端默认 natural,无破坏性验证
9d42c24b09tod7a1c8ee07- Add TTS_STYLE_OPTIONS (6 presets: natural/excited/professional/sweet/news/livestream) with DEFAULT_TTS_STYLE=natural and shared getTtsStyle() helper - Add reusable TtsStyleSelector component (compact + normal modes, purple theme) - Wire style param through all TTS paths: * api/tts types: TTSSynthesizeRequest + TTSPreviewRequest add style?: string * voices library: hook state → TtsModal compact selector → synthesize payload * voice-materials library: hook state → TtsModal compact selector → payload * generate Step5: formState → TtsVoiceModal (internal/external controlled) → synthesize payload → narrative video payload tts_style * ai-avatar lipsync: hook state → PanelVoiceSelector → previewTts + createLipsyncJob - SegmentTtsConfig adds style?: string for editing-planner TtsPanel (UI pending) - All style params optional; backend will honor when supported, default naturald7a1c8ee07to5e0e32b1c2CI全绿,自动审批通过。
CI全绿,自动审批通过。
🚀 预览环境已部署
🗑️ 预览环境已清理
PR #2000 已关闭或合并,对应的预览环境已被清理。