#6246 :{'text': 'hello, my friend', 'role': 'Lennart Kurz', 'filename': 'D:/pyVideoTrans/win-pyvideotrans-v4.07/tmp/2272/17856

89.116* Posted at: 6 hours ago

:
{'text': 'hello, my friend', 'role': 'Lennart Kurz', 'filename': 'D:/pyVideoTrans/win-pyvideotrans-v4.07/tmp/2272/1785682784.4395144-cambtts.wav', 'tts_type': 32}
Traceback (most recent call last):
File "httpx\_transports\default.py", line 101, in map_httpcore_exceptions
File "httpx\_transports\default.py", line 127, in iter
File "httpcore\_sync\connection_pool.py", line 367, in iter
File "httpcore\_sync\connection_pool.py", line 363, in iter
File "httpcore\_sync\http11.py", line 349, in iter
File "httpcore\_sync\http11.py", line 341, in iter
File "httpcore\_sync\http11.py", line 210, in _receive_response_body
File "httpcore\_sync\http11.py", line 224, in _receive_event
File "httpcore\_backends\sync.py", line 124, in read
File "contextlib.py", line 153, in exit
File "httpcore\_exceptions.py", line 14, in map_exceptions
httpcore.ReadTimeout: The read operation timed out

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 21, in run
File "videotrans\tts\__init__.py", line 221, in run
File "videotrans\tts\_base.py", line 130, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_cambtts.py", line 104, in _run
File "camb\text_to_speech\client.py", line 107, in tts
File "camb\text_to_speech\raw_client.py", line 136, in
File "httpx\_models.py", line 897, in iter_bytes
File "httpx\_models.py", line 951, in iter_raw
File "httpx\_client.py", line 153, in iter
File "httpx\_transports\default.py", line 126, in iter
File "contextlib.py", line 153, in exit
File "httpx\_transports\default.py", line 118, in map_httpcore_exceptions
httpx.ReadTimeout: The read operation timed out


=
system:Windows-10-10.0.22631-SP0
version:v4.08
frozen:True
language:zh
root_dir:D:/pyVideoTrans/win-pyvideotrans-v4.07

1 Replies

这是由于调用 CAMB AI 在线配音服务时网络读取超时(httpx.ReadTimeout)导致的。CAMB TTS 属于云端 API 接口,音频生成耗时较长,若网络不稳定或服务器响应缓慢,就会在读取音频流数据时超时中断。

可按以下步骤排查处理:

  1. 打开 菜单 -> 网络代理,确认代理配置正确。如果不需要代理,确保代理文本框是清空状态;正确格式为 http://127.0.0.1:端口号socks5://127.0.0.1:端口号,无效代理会导致所有网络请求失败。
  2. 检查本机网络能否稳定访问 CAMB AI 服务。如果属于国外 API,国内访问可能需要科学上网。
  3. 高级选项 -> 字幕配音调整 中,将 配音后暂停秒 适当调大(如 5-10 秒),降低请求频率,避免连续高频触发超时。
  4. 如果超时发生在音频生成耗时较长的长句上,可确认是否设置了过长的单句字幕文本,必要时在字幕中断句拆分。
  5. 若仍频繁失败,可先尝试切换为 Edge-TTS 免费渠道完成配音,再排查 CAMB 服务状态。

请查阅相关文档:

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