#4011 TaskCfgVTT(is_cuda=True, uuid='cae5b1ba1b', cache_folder='D:/fanyi/tmp/44060/cae5b1ba1b', target_dir='C:/Users/admin/Dow

183.11* Posted at: 3 hours ago 👁7

翻译字幕阶段出错 [百度翻译] INVALID_TO_PARAM
Traceback (most recent call last):
File "videotrans\translator\_base.py", line 98, in run
File "videotrans\translator\_base.py", line 119, in _run_text
File "tenacity\__init__.py", line 338, in wrapped_f
File "tenacity\__init__.py", line 477, in call
File "tenacity\__init__.py", line 378, in iter
File "tenacity\__init__.py", line 421, in exc_check
tenacity.RetryError: RetryError[]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\job.py", line 173, in run
File "videotrans\task\trans_create.py", line 658, in trans
File "videotrans\translator\__init__.py", line 952, in run
File "videotrans\translator\_base.py", line 100, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_baidu.py", line 53, in _item_task
RuntimeError: INVALID_TO_PARAM
TaskCfgVTT(is_cuda=True, uuid='cae5b1ba1b', cache_folder='D:/fanyi/tmp/44060/cae5b1ba1b', target_dir='C:/Users/admin/Downloads/chrome-extension___kpijpofphpajhdiceecibhohpogbippn_popup_popup.html/_video_out/DM_20260410181223_001-mp4', source_language='简体中文', source_language_code='zh-cn', source_sub='C:/Users/admin/Downloads/chrome-extension___kpijpofphpajhdiceecibhohpogbippn_popup_popup.html/_video_out/DM_20260410181223_001-mp4/zh-cn.srt', source_wav='D:/fanyi/tmp/44060/cae5b1ba1b/zh-cn.wav', source_wav_output='C:/Users/admin/Downloads/chrome-extension___kpijpofphpajhdiceecibhohpogbippn_popup_popup.html/_video_out/DM_20260410181223_001-mp4/zh-cn.m4a', target_language='马来西亚语', target_language_code='ms', target_sub='C:/Users/admin/Downloads/chrome-extension___kpijpofphpajhdiceecibhohpogbippn_popup_popup.html/_video_out/DM_20260410181223_001-mp4/ms.srt', target_wav='D:/fanyi/tmp/44060/cae5b1ba1b/target.wav', target_wav_output='C:/Users/admin/Downloads/chrome-extension___kpijpofphpajhdiceecibhohpogbippn_popup_popup.html/_video_out/DM_20260410181223_001-mp4/ms.m4a', name='C:/Users/admin/Downloads/chrome-extension___kpijpofphpajhdiceecibhohpogbippn_popup_popup.html/DM_20260410181223_001.mp4', noextname='DM_20260410181223_001', basename='DM_20260410181223_001.mp4', ext='mp4', dirname='C:/Users/admin/Downloads/chrome-extension___kpijpofphpajhdiceecibhohpogbippn_popup_popup.html', shound_del_name=None, translate_type=15, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='No', voice_autorate=False, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, detect_language='zh-cn', recogn_type=8, model_name='1.7B', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=False, subtitle_language=None, app_mode='tiqu', subtitles='', targetdir_mp4='C:/Users/admin/Downloads/chrome-extension___kpijpofphpajhdiceecibhohpogbippn_popup_popup.html/_video_out/DM_20260410181223_001-mp4/DM_20260410181223_001.mp4', novoice_mp4='D:/fanyi/tmp/44060/cae5b1ba1b/novoice.mp4', is_separate=True, embed_bgm=True, instrument='D:/fanyi/tmp/44060/cae5b1ba1b/instrument.wav', vocal='D:/fanyi/tmp/44060/cae5b1ba1b/vocal.wav', back_audio='', clear_cache=False, background_music=None, subtitle_type=0, only_out_mp4=True, recogn2pass=True, output_srt=1, copysrt_rawvideo=False)


=
system:Windows-10-10.0.26200-SP0
version:v3.98
frozen:True
language:zh
root_dir:D:/fanyi

1 Replies

翻译阶段出错的原因是百度翻译API返回了“INVALID_TO_PARAM”错误,这通常表示目标语言参数无效或不支持。

  1. 检查目标语言支持:根据错误日志,您设置的目标语言是“马来西亚语”(代码 ms)。请登录您的百度翻译开放平台控制台,确认您申请的API服务是否支持翻译到马来西亚语(ms)。百度翻译可能未开通或未支持该语种。
  2. 修改目标语言:如果确认不支持,请返回pyVideoTrans主界面,将“目标语言”更改为百度翻译支持的语种(例如“英语”、“日语”等),然后重新尝试翻译。
  3. 验证API配置:确保在 菜单 -> 翻译设置 -> 百度翻译设置 中填写的APP ID和密钥正确无误,且账户余额充足。
  4. 尝试其他翻译渠道:如果必须翻译成马来西亚语,可以尝试更换为支持该语种的其他翻译渠道,例如Google翻译(需配置网络代理)、微软翻译或支持多语言的AI大模型(如DeepSeek、GPT等)。

请查阅相关文档:

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.

Related resource