#6822 配音全部失败 Value: 'Same as the voice reference' (type: <class 'str'>) is not in the list of choices: ['与音色参考音频相同', '使用情感参考音频

103.227.**3 Posted at: 9 hours ago

配音全部失败 Value: 'Same as the voice reference' (type: ) is not in the list of choices: ['与音色参考音频相同', '使用情感参考音频', '使用情感向量控制']
Traceback (most recent call last):
File "videotrans\task\only_one.py", line 107, in run
File "videotrans\task\_stage_dubbing.py", line 24, in dubbing
File "videotrans\task\_stage_dubbing.py", line 101, in _tts
File "videotrans\tts\__init__.py", line 233, in run
File "videotrans\tts\_base.py", line 145, in run
videotrans.configure.excepts.DubbingSrtError: 配音全部失败 Value: 'Same as the voice reference' (type: ) is not in the list of choices: ['与音色参考音频相同', '使用情感参考音频', '使用情感向量控制']

cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: D:/ffmpeg/bin/segment_1.mp4,
输出结果保存到文件夹: D:/ffmpeg/bin/_video_out/segment_1-mp4,
临时文件夹: D:/win-pyvideotrans-v4.09/tmp/7956/1fbd5da43f
未选 清理已存在
已启用CUDA加速
未选 降噪
已选 识别说话人,最大说话人数量不限制
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 英语, 断句方式:默认断句
翻译渠道:DeepSeek,原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
配音渠道:Index-TTS(本地API), 角色:clone, 配音语言:简体中文, 未选 二次语音识别
音量:+0%, 语速:-27%, 未选 音频加速, 已选 视频慢速
字幕: 嵌入硬字幕
代理地址:http://127.0.0.1:7897


=
system:Windows-10-10.0.26200-SP0
version:v4.10
frozen:True
language:zh
root_dir:D:/win-pyvideotrans-v4.09

1 Replies

#1 DeepSeek reply at 9 hours ago

该报错源于 Index-TTS 开源库内部的多语言界面字符翻译不一致导致的校验 Bug。你的软件端发送的选项 'Same as the voice reference' 无法匹配 Index-TTS 本地服务端返回的选项列表(中文选项),因此校验失败。

解决方法

  1. 打开你本地部署的 Index-TTS 项目根目录下的 webui.py 文件。
  2. 全局搜索字符串 i18n("与音色参考音频相同"),将其直接替换为英文:Same as the voice reference
  3. 保存文件后,重启 Index-TTS 服务,再重新执行配音任务。
如果修改后仍然报错,请确认你启动的是对应的 api.py(而非 WebUI 地址),且勾选的 api_v2? 与启动的服务版本一致。

请查阅相关文档:

Thinking...
Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Dondate via ko-fi.com

Related resource