#4618 TaskCfgTTS(is_cuda=False, uuid='7065960e13', cache_folder='C:/sp/tmp/5872/7065960e13', target_dir='E:/YouTube/fanyi/tts'

120.216* Posted at: 14 hours ago 👁19

配音阶段出错 [Edge-TTS(免费)] 无效的值或参数:Invalid pitch '+0%Hz'.
Traceback (most recent call last):
File "videotrans\task\job.py", line 213, in run
File "videotrans\task\_dubbing.py", line 51, in dubbing
File "videotrans\task\_dubbing.py", line 143, in _tts
File "asyncio\runners.py", line 44, in run
File "asyncio\base_events.py", line 649, in run_until_complete
File "videotrans\task\_base.py", line 159, in _edgetts_single
File "edge_tts\communicate.py", line 333, in init
File "", line 8, in init
File "edge_tts\data_classes.py", line 76, in post_init
File "edge_tts\data_classes.py", line 40, in validate_string_param
ValueError: Invalid pitch '+0%Hz'.
TaskCfgTTS(is_cuda=False, uuid='7065960e13', cache_folder='C:/sp/tmp/5872/7065960e13', target_dir='E:/YouTube/fanyi/tts', source_language=None, source_language_code=None, source_sub=None, source_wav=None, source_wav_output=None, target_language=None, target_language_code='en', target_sub='C:/Users/mgclong/Desktop/1.txt', target_wav='E:/YouTube/fanyi/tts/1.wav', target_wav_output=None, name='C:/Users/mgclong/Desktop/1.txt', noextname='1', basename='1.txt', ext='txt', dirname='C:/Users/mgclong/Desktop', shound_del_name=None, tts_type=0, volume='+0%', pitch='+0%Hz', voice_rate='+20%', voice_role='Christopher(Male/US)', voice_autorate=False, video_autorate=False, remove_silent_mid=False, align_sub_audio=False)


=
system:Windows-10-10.0.19045-SP0
version:v3.99
frozen:True
language:zh
root_dir:C:/sp

1 Replies

Edge-TTS 的音调(pitch)参数只接受 +XHz-XHz+X% 等形式,而当前配置中录入了 +0%Hz(混合了百分比和Hz符号),导致数据校验失败。

解决方案:

  1. 点击顶部菜单 工具/选项高级选项 → 找到 「音调+」 参数(通常在「字幕配音调整」区域)。
  2. 将该值改为 0(纯数字,不带任何符号或单位),或设为类似 20-20 之类的数值。
  3. 保存设置后,重新执行任务即可。

请查阅相关文档:

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