#5829 :Traceback (most recent call last):

113.128* Posted at: 1 hour ago

:
Traceback (most recent call last):
File "urllib\request.py", line 1348, in do_open
File "http\client.py", line 1283, in request
File "http\client.py", line 1329, in _send_request
File "http\client.py", line 1278, in endheaders
File "http\client.py", line 1038, in _send_output
File "http\client.py", line 976, in send
File "http\client.py", line 1448, in connect
File "http\client.py", line 942, in connect
File "socket.py", line 857, in create_connection
File "socket.py", line 845, in create_connection
TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\tts\_piper.py", line 75, in _exec
File "piper\voice.py", line 401, in synthesize_wav

for audio_chunk in self.synthesize(

File "piper\voice.py", line 285, in synthesize

sentence_phonemes = self.phonemize(text)

File "piper\voice.py", line 192, in phonemize

phonemizer = ChinesePhonemizer(self.download_dir / "g2pW")

File "piper\phonemize_chinese.py", line 210, in init

download_model(model_dir)

File "piper\phonemize_chinese.py", line 381, in download_model

with urlopen(G2PW_URL) as response:

File "urllib\request.py", line 216, in urlopen
File "urllib\request.py", line 519, in open
File "urllib\request.py", line 536, in _open
File "urllib\request.py", line 496, in _call_chain
File "urllib\request.py", line 1391, in https_open
File "urllib\request.py", line 1351, in do_open
urllib.error.URLError:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 21, in run
File "videotrans\tts\__init__.py", line 207, in run
File "videotrans\tts\_base.py", line 93, in run
File "videotrans\tts\_piper.py", line 95, in _exec
File "videotrans\tts\_piper.py", line 74, in _exec
File "wave.py", line 332, in exit
File "wave.py", line 444, in close
File "wave.py", line 462, in _ensure_header_written
wave.Error: # channels not specified


=
system:Windows-10-10.0.26100-SP0
version:v4.05
frozen:True
language:zh
root_dir:E:/soft_run/win-videotrans

1 Replies

这通常是网络问题导致的 Piper TTS 中文音素模型下载失败。PyVideoTrans 内置的 Piper 配音渠道在处理中文时,需要额外下载 g2pW 模型,而该模型存储于国外站点,国内直连极易超时。

解决方案(任选其一):

  1. 切换配音渠道(推荐):在 Dubbing Channel 中改为 Edge-TTS(免费、开箱即用)或 Qwen-TTS(本地内置),无需额外下载模型。
  2. 配置网络代理:在主界面第 5 行 网络代理 中填写可科学上网的代理地址(格式 http://127.0.0.1:端口号),然后重试。
  3. 手动下载模型:将 g2pW 模型文件提前下载到 软件目录/models/piper/ 下(具体文件名可查阅报错中的 URL),但更建议使用方案 1 回避此问题。

若更换渠道后仍有其他报错,请提供最新的日志(logs/ 目录下日期最新的 .log 文件)。

请查阅相关文档:

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