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

171.217* Posted at: 1 hour ago

Value: 'Same as the voice reference' (type: ) is not in the list of choices: ['与音色参考音频相同', '使用情感参考音频', '使用情感向量控制']:
{'text': '你好啊我的朋友,希望你今天开心!', 'role': 'zh_female_cn.wav', 'filename': 'H:/pyvideotrans/tmp/12520/1784917588.693362-11.wav', 'tts_type': 11}
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 21, in run
File "videotrans\tts\__init__.py", line 207, in run
File "videotrans\tts\_base.py", line 141, in run
videotrans.configure.excepts.DubbingSrtError: Value: 'Same as the voice reference' (type: ) is not in the list of choices: ['与音色参考音频相同', '使用情感参考音频', '使用情感向量控制']


=
system:Windows-10-10.0.26100-SP0
version:v4.07
frozen:True
language:zh
root_dir:H:/pyvideotrans

1 Replies

这是 index-tts 开源库内部多语言翻译不一致导致的校验 Bug。index-ttswebui.py 中某个下拉选项被翻译成了中文,而内部传递的值却是英文 "Same as the voice reference",造成选项不匹配。

解决办法:

  1. 找到你本地部署的 index-tts 项目根目录下的 webui.py 文件。
  2. 在该文件中全局搜索字符串 i18n("与音色参考音频相同")
  3. 将其直接替换为英文:Same as the voice reference
  4. 保存文件并重启 index-tts 服务。

重新在 pyVideoTrans 中执行配音任务即可。如果还有其他类似错误,可对同一个文件中的其他中文选项做同样处理。

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

Dondate via PayPal

Related resource