#4877 ValueError: Invalid language: zh

2409:893d* Posted at: 1 hour ago

Invalid language: zh:
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 16, in run
File "videotrans\tts\__init__.py", line 183, in run
File "videotrans\tts\_base.py", line 132, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_supertonic.py", line 31, in _run
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.22631-SP0
version:v4.00
frozen:True
language:zh
root_dir:E:/pyvideotrans

1 Replies

Supertonic TTS 不支持语言代码 zh,它要求使用完整代码(如 zh-cnzh_CN)。请检查软件中的目标语言是否选择为 简体中文 (zh-cn),而不是 中文 (zh)。另外试听时可先切换到 Edge-TTS 确认角色是否正确。

解决方法:

  1. 在主界面将 目标语言 切换为 简体中文 (zh-cn)
  2. 若仍报错,暂时改用免费 Edge-TTS 配音渠道(无需配置),待 Supertonic 角色/语言配置正确后再切回。

请查阅相关文档:

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

Similar issues already exist