#5125 self.api_url='http://127.0.0.1:7860'

119.123* Posted at: 3 hours ago

Value: 'Same as the voice reference' (type: ) is not in the list of choices: ['与音色参考音频相同', '使用情感参考音频', '使用情感向量控制']
self.api_url='http://127.0.0.1:7860':
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 16, in run
File "videotrans\tts\__init__.py", line 184, in run
File "videotrans\tts\_base.py", line 134, in run
videotrans.configure.excepts.DubbingSrtError: Value: 'Same as the voice reference' (type: ) is not in the list of choices: ['与音色参考音频相同', '使用情感参考音频', '使用情感向量控制']
self.api_url='http://127.0.0.1:7860'


=
system:Windows-10-10.0.19045-SP0
version:v4.02
frozen:True
language:zh
root_dir:G:/VideoTrans

1 Replies

这是由于 index-tts 后端服务界面语言为中文时,内部使用了中文选项("与音色参考音频相同"),但 pyVideoTrans 发送的请求中使用了英文选项 "Same as the voice reference",导致接口无法识别而报错。

解决方案

  1. 打开 index-tts 项目的 webui.py 文件(通常位于你部署 index-tts 的目录下)。
  2. 搜索字符串 i18n("与音色参考音频相同"),将其替换为 Same as the voice reference
  3. 保存文件并重启 index-tts 服务。

如果无法修改 index-tts 代码,可暂时改为使用其他配音渠道(如 Edge-TTS 或 Qwen-TTS)绕开该问题。

请查阅相关文档:

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: ko-fi.com/jianchang512

Related resource