fix(#1898): TTS 情绪映射修正为 CosyVoice v3 官方英文枚举(P1 更正) #1933
Reference in New Issue
Block a user
Delete Branch "fix/p1-tts-emotion-enum"
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?
背景
之前 PR#1932 错误地将 normalize_emotion 映射到中文描述词(如"开心愉快""悲伤难过"),但对照阿里云百炼官方文档(https://help.aliyun.com/zh/model-studio/cosyvoice-voice-list)确认:
你说话的情感是<情感值>。(结尾中文句号不可省略)neutral/happy/sad/angry/surprised/fearful/disgusted改动
packages/application/cosyvoice_service.pyapps/api/app/schemas/lipsync.py、routes/voice_clones.py:description 更新,preview 白名单加入中文 7 标签和常见别名测试
tests/unit/test_cosyvoice_emotion.py(重写,89 用例)tests/unit/test_ai_avatar_emotion_tts_lipsync.py:修正旧断言为英文枚举值,新增中文标签/未知值断言tests/unit/test_voice_clone_preview.py:非法 emotion 用例保留验证
关联
🚀 预览环境已部署
CI green, verified instruction format against CosyVoice v3 official docs (emotion values must be English enums: neutral/happy/sad/angry/surprised/fearful/disgusted)
CI green, fixes emotion mapping to official English enums
🗑️ 预览环境已清理
PR #1933 已关闭或合并,对应的预览环境已被清理。