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

178.128* Posted at: 4 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 87, in run
File "videotrans\task\trans_create.py", line 679, in dubbing
File "videotrans\task\trans_create.py", line 1001, in _tts
File "videotrans\tts\__init__.py", line 184, in run
File "videotrans\tts\_base.py", line 147, in run
videotrans.configure.excepts.DubbingSrtError: 配音全部失败 Value: 'Same as the voice reference' (type: ) is not in the list of choices: ['与音色参考音频相同', '使用情感参考音频', '使用情感向量控制', '使用情感描述文本控制']
TaskCfgVTT(uuid='3106892250', name='D:/Pretreatment/AI Dubbing/Xqj1162EnT01.mp4', dirname='D:/Pretreatment/AI Dubbing', noextname='Xqj1162EnT01', basename='Xqj1162EnT01.mp4', ext='mp4', target_dir='D:/Pretreatment/AI Dubbing/_video_out/Xqj1162EnT01-mp4', cache_folder='F:/win-pyvideotrans-v4.02-0615/tmp/23500/3106892250', is_cuda=True, source_language='简体中文', source_language_code='zh-cn', source_sub='D:/Pretreatment/AI Dubbing/_video_out/Xqj1162EnT01-mp4/zh-cn.srt', source_wav='F:/win-pyvideotrans-v4.02-0615/tmp/23500/3106892250/zh-cn.wav', source_wav_output='D:/Pretreatment/AI Dubbing/_video_out/Xqj1162EnT01-mp4/zh-cn.m4a', target_language='英语', target_language_code='en', target_sub='D:/Pretreatment/AI Dubbing/_video_out/Xqj1162EnT01-mp4/en.srt', target_wav='F:/win-pyvideotrans-v4.02-0615/tmp/23500/3106892250/target.wav', target_wav_output='D:/Pretreatment/AI Dubbing/_video_out/Xqj1162EnT01-mp4/en.m4a', translate_type=0, tts_type=9, volume='+0%', pitch='+0Hz', voice_rate='+10%', voice_role='clone', voice_autorate=False, video_autorate=False, remove_silent_mid=False, align_sub_audio=False, detect_language='zh-cn', recogn_type=2, model_name='1.7B', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=0, subtitle_language=None, app_mode='biaozhun', subtitles='', targetdir_mp4='D:/Pretreatment/AI Dubbing/_video_out/Xqj1162EnT01-mp4/Xqj1162EnT01.mp4', novoice_mp4='F:/win-pyvideotrans-v4.02-0615/tmp/23500/3106892250/novoice.mp4', is_separate=False, embed_bgm=False, instrument='F:/win-pyvideotrans-v4.02-0615/tmp/23500/3106892250/instrument.wav', vocal='F:/win-pyvideotrans-v4.02-0615/tmp/23500/3106892250/vocal.wav', clear_cache=False, background_music='', subtitle_type=1, only_out_mp4=False, recogn2pass=False, output_srt=0, copysrt_rawvideo=False, loop_backaudio=1, backaudio_volume=0.8)


=
system:Windows-10-10.0.19045-SP0
version:v4.02
frozen:True
language:zh
root_dir:F:/win-pyvideotrans-v4.02-0615

1 Replies

这是由于 Index-TTS 开源库内部的国际化翻译不一致导致的 Bug。软件发送的英文选项 Same as the voice reference 未被 Index-TTS 的校验逻辑识别,它期望的是中文字符串列表。

解决办法:

  1. 找到您本地部署的 Index-TTS 项目根目录下的 webui.py 文件。
  2. 在该文件中全局搜索 i18n("与音色参考音频相同"),将其替换为 "Same as the voice reference"(直接写英文,去掉 i18n() 包裹)。
  3. 保存文件并重启 Index-TTS 服务。
  4. 若仍出错,请更新 pyVideoTrans 至最新版本(v4.06),该问题可能已在后续版本中做了兼容处理。

请查阅相关文档:

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