#2972 ValueError: Invalid language: zh

103.151* Posted at: 18 days ago 👁37

无效的值或参数:Invalid language: zh:
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 17, in run
File "videotrans\tts\__init__.py", line 366, in run
File "videotrans\tts\_base.py", line 183, in run
File "videotrans\tts\_base.py", line 211, in _local_mul_thread
File "videotrans\tts\_supertonic.py", line 68, in _item_task
File "videotrans\util\helper_supertonic.py", line 234, in call
File "videotrans\util\helper_supertonic.py", line 189, in _infer
File "videotrans\util\helper_supertonic.py", line 120, in call
File "videotrans\util\helper_supertonic.py", line 121, in
File "videotrans\util\helper_supertonic.py", line 103, in _preprocess_text
ValueError: Invalid language: zh


=
system:Windows-10-10.0.26100-SP0
version:v3.95
frozen:True
language:zh
root_dir:D:/win-pyvideotrans-v3.95

1 Replies

这是由于在使用 supertonic-2 配音渠道时,传入的语言代码 zh 不被支持导致的。

  1. 问题原因:supertonic-2 模型有其特定的语言代码要求,不支持通用的 zh 代码。
  2. 解决方案

    • 在 pyVideoTrans 的配音设置中,将“目标语言”从 zh 更改为 supertonic-2 支持的语言代码,例如 zh-CN(简体中文)或 zh-TW(繁体中文)。
    • 如果问题依旧,请检查 supertonic-2 服务端是否已正确启动,并确认其支持的语言列表。
  3. 参考文档:关于 supertonic-2 配音渠道的详细配置,请查阅:

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