fix: CosyVoice 音色名 v3 后缀修复(418错误) #213
Reference in New Issue
Block a user
Delete Branch "fix/cosyvoice-v3-voice-names"
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?
问题
DashScope cosyvoice-v3.5-plus 模型要求系统音色名必须带
_v3后缀(如longxiaochun_v3),使用旧版音色名(如longxiaochun)会返回 418 错误(音色不支持/音色与模型不匹配)。修复内容
packages/shared/config.py:默认音色改为longxiaochun_v3packages/domain/preset_voices.py:8个预置音色全部加上_v3后缀packages/application/cosyvoice_service.py:docstring 示例更新验证
130/130 相关测试全部通过。
代码审计 — PR #213 CosyVoice 音色名 v3 后缀修复(418错误)
结论:✅ 通过,可直接合并部署
改动概览
cosyvoice-v3.5-plus模型要求系统音色使用_v3后缀(如longxiaochun_v3),旧名无后缀导致引擎返回 418 音色不支持✅ 验证结果
_v3后缀config.py默认音色longxiaochun→longxiaochun_v3preset_voices.py音色 ID + docstringcosyvoice_service.pydocstring 示例📊 测试覆盖
📌 备注
结论:改动完整、测试全绿、风险极低,合并后立即部署 staging 验证 CosyVoice TTS 通路。