#4901 Value: 'Same as the voice reference' (type: ) is not in the list of choices: ['与音色参考音频相同', '使用情感参考音频', '使用情感向量控制']:Trace

2409:8a55* Posted at: 18 hours ago

Value: 'Same as the voice reference' (type: ) is not in the list of choices: ['与音色参考音频相同', '使用情感参考音频', '使用情感向量控制']:
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: ['与音色参考音频相同', '使用情感参考音频', '使用情感向量控制']

5 Replies

这是由于 index-tts 项目的 webui.py 文件中国际化字符串未正确映射导致的兼容性问题。

解决方案

  1. 打开 index-tts 项目目录下的 webui.py 文件。
  2. 搜索 i18n("与音色参考音频相同") 并替换为 Same as the voice reference
  3. 保存文件后重启 index-tts 服务,再在 pyVideoTrans 中重试。

请查阅相关文档:

'与音色参考音频相同', '使用情感参考音频', '使用情感向量控制'一共有3个,英文改成什么

关于 index-tts 的三个中文选项,知识库只明确给出了第一个的英文映射:

中文建议英文
与音色参考音频相同Same as the voice reference(已确认)
使用情感参考音频Use emotional reference audio(常见推荐,但未在知识库中明确)
使用情感向量控制Use emotion vector control(常见推荐,但未在知识库中明确)

由于后两个英文值未在官方文档或知识库中收录,建议您按以下方式验证:

  1. 打开 index-tts 项目的 webui.py 文件,搜索 '使用情感参考音频''使用情感向量控制',查看其原始定义。
  2. 在这些中文字符串附近,通常会有对应的英文枚举值(例如 choices=['与音色参考音频相同', '使用情感参考音频', '使用情感向量控制']),将中文直接替换为恰当的英文。
  3. 保存后重启 index-tts 服务,再在 pyVideoTrans 中重试。

如果仍无法确定,可提供 index-tts 的 webui.py 文件中相关代码片段,以便进一步分析。

使用情感描述文本控制,这个呢

“使用情感描述文本控制”在知识库中无对应英文映射。建议您按以下步骤自行确认:

  1. 打开 index-tts 项目目录下的 webui.py 文件。
  2. 搜索 “使用情感描述文本控制”。
  3. 在该中文字符串附近,通常会有类似 choices=[...] 的列表,里面应包含对应的英文值。将该中文替换为找到的英文即可。

如果找不到或无法解决,请提供 webui.py 中相关代码片段,以便进一步分析。

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

Similar issues already exist