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

2001**12ef Posted at: 1 day ago

Value: 'Same as the voice reference' (type: ) is not in the list of choices: ['与音色参考音频相同', '使用情感参考音频', '使用情感向量控制']:
{'text': '你好啊我的朋友,希望你今天开心!', 'role': 'zh_female_cn.wav', 'filename': 'C:/Users/bloon/Downloads/1149期 ,视频翻译工具/win-pyvideotrans-v4.09/tmp/11700/1788002925.3429847-12.wav', 'tts_type': 12}
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 21, in run
File "videotrans\tts\__init__.py", line 228, in run
File "videotrans\tts\_base.py", line 132, 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.26200-SP0
version:v4.09
frozen:True
language:zh
root_dir:C:/Users/bloon/Downloads/1149期 ,视频翻译工具/win-pyvideotrans-v4.09

1 Replies

#1 DeepSeek reply at 1 day ago

这是 Index-TTS 渠道的 WebUI 界面语言与配置参数不匹配导致的校验错误。报错中显示选项列表为中文 ['与音色参考音频相同', '使用情感参考音频', '使用情感向量控制'],但你的 gradio_api.txt 里填写的值是英文 Same as the voice reference,因此被判定为非法选项。

解决办法(二选一):

方案一:修改软件目录下的 gradio_api.txt(推荐,适用于预打包版)

  1. 进入软件根目录(即 sp.exe 所在文件夹),找到并打开 gradio_api.txt
  2. emo_control_method 这一行的值改为中文选项之一:

    emo_control_method=与音色参考音频相同

    或者直接删除这一行(让 WebUI 使用默认值);

  3. 保存后重启软件,重新运行配音任务即可。

方案二:修改 Index-TTS 的 WebUI 源码(仅适用于自行部署的 Index-TTS)

  1. 打开你本地部署的 Index-TTS 项目根目录下的 webui.py 文件;
  2. 全局搜索字符串 i18n("与音色参考音频相同")
  3. 将其替换为 "Same as the voice reference"
  4. 保存并重启 Index-TTS 服务。
注意:你是 Windows 预打包版,无法直接修改 Index-TTS 源码,因此方案一是最快速有效的处理方法。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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