#3901 TaskCfg(cache_folder='C:/pyvideotrans/tmp/5312/ee3e9b03ee', target_dir='c:/pyvideotrans/output/recogn', remove_noise=Fal

2408:821a* Posted at: 2 hours ago 👁9

语音识别阶段出错 [openai-whisper(本地)] 连接被拒绝,目标服务可能未运行或端口错误
Traceback (most recent call last):
File "videotrans\task\job.py", line 113, in run
File "videotrans\task\_speech2text.py", line 146, in recogn
File "videotrans\recognition\__init__.py", line 245, in run
File "videotrans\recognition\_base.py", line 80, in run
File "videotrans\recognition\_overall.py", line 182, in _exec
RuntimeError: Traceback (most recent call last):
File "urllib\request.py", line 1348, in do_open
File "http\client.py", line 1282, in request
File "http\client.py", line 1328, in _send_request
File "http\client.py", line 1277, in endheaders
File "http\client.py", line 1037, in _send_output
File "http\client.py", line 975, in send
File "http\client.py", line 1447, in connect
File "http\client.py", line 941, in connect
File "socket.py", line 845, in create_connection
File "socket.py", line 833, in create_connection
ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\_overall.py", line 114, in run
File "whisper\__init__.py", line 137, in load_model
File "whisper\__init__.py", line 73, in _download
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:

TaskCfg(cache_folder='C:/pyvideotrans/tmp/5312/ee3e9b03ee', target_dir='c:/pyvideotrans/output/recogn', remove_noise=False, is_separate=False, detect_language='en', subtitle_language=None, source_language=None, target_language=None, source_language_code=None, target_language_code=None, source_sub=None, target_sub='c:/pyvideotrans/output/recogn/08 - Lauterbrunnen. The valley of waterfalls and mountain peaks. Switzerland. Aerial 360 video in 12K..srt', source_wav=None, source_wav_output=None, target_wav=None, target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='08 - Lauterbrunnen. The valley of waterfalls and mountain peaks. Switzerland. Aerial 360 video in 12K.', shibie_audio='C:/pyvideotrans/tmp/5312/ee3e9b03ee/08 - Lauterbrunnen. The valley of waterfalls and mountain peaks. Switzerland. Aerial 360 video in 12K.-1775100151.172222.wav', targetdir_mp4=None, instrument=None, vocal=None, back_audio=None, background_music=None, app_mode='biaozhun', subtitle_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role=None, copysrt_rawvideo=False, clear_cache=False, translate_type=None, tts_type=None, recogn_type=1, model_name='large-v3-turbo', split_type=0, voice_autorate=False, video_autorate=False, cuda=True, name='C:/B站/YouTube的音频/Relax 360 videos - ad/08 - Lauterbrunnen. The valley of waterfalls and mountain peaks. Switzerland. Aerial 360 video in 12K..m4a', basename='08 - Lauterbrunnen. The valley of waterfalls and mountain peaks. Switzerland. Aerial 360 video in 12K..m4a', ext='m4a', dirname='C:/B站/YouTube的音频/Relax 360 videos - ad', shound_del_name=None, uuid='ee3e9b03ee', remove_silent_mid=False, align_sub_audio=True, enable_diariz=True, nums_diariz=0, rephrase=2, only_out_mp4=False)


=
system:Windows-10-10.0.22631-SP0
version:v3.92
frozen:True
language:zh
root_dir:C:/pyvideotrans

1 Replies

这是由于网络连接问题导致无法从 HuggingFace 下载 openai-whisper 模型文件。错误表明目标服务器(huggingface.co)被拒绝连接,通常是因为网络不通或需要代理。

解决方案:

  1. 配置网络代理:如果你有可用的代理服务(VPN),请在软件主界面的“网络代理地址”文本框中填写代理地址,格式如 http://127.0.0.1:10808(端口号请根据你的代理客户端设置修改)。
  2. 手动下载模型:如果无法使用代理,可以手动下载模型文件。

    • 前往 HuggingFace 模型页面:https://huggingface.co/openai/whisper-large-v3-turbo/tree/main(根据你选择的模型,如 large-v3-turbo)。
    • 将该页面所有 .json.bin.txt 等文件下载到本地。
    • 在软件根目录的 models 文件夹内,创建名为 models--openai--whisper-large-v3-turbo 的文件夹(注意命名规则),并将下载的文件放入其中。
    • 重启软件,openai-whisper 将使用本地模型文件,无需联网下载。
  3. 切换识别渠道:作为临时解决方案,可以切换到 faster-whisper(本地) 渠道,它可能使用不同的下载源或已有缓存。

请查阅相关文档:

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