#3064 使用阿里百炼ASR做语音识别模型时必现网络连接失败(已尝试墙内外都不行)但是设置中的翻译测试可通过

23.177* Posted at: 13 hours ago 👁10

语音识别阶段出错 [阿里百炼 Qwen3-ASR] 网络连接失败
Traceback (most recent call last):
File "urllib3\connectionpool.py", line 787, in urlopen
File "urllib3\connectionpool.py", line 534, in _make_request
File "urllib3\connection.py", line 565, in getresponse
File "http\client.py", line 1374, in getresponse
File "http\client.py", line 318, in begin
File "http\client.py", line 287, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "requests\adapters.py", line 644, in send
File "urllib3\connectionpool.py", line 841, in urlopen
File "urllib3\util\retry.py", line 474, in increment
File "urllib3\util\util.py", line 38, in reraise
File "urllib3\connectionpool.py", line 787, in urlopen
File "urllib3\connectionpool.py", line 534, in _make_request
File "urllib3\connection.py", line 565, in getresponse
File "http\client.py", line 1374, in getresponse
File "http\client.py", line 318, in begin
File "http\client.py", line 287, in _read_status
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\job.py", line 106, in run
File "videotrans\task\_speech2text.py", line 156, in recogn
File "videotrans\recognition\__init__.py", line 249, in run
File "videotrans\recognition\_base.py", line 140, in run
File "videotrans\recognition\_qwen3asr.py", line 40, in _exec
File "dashscope\aigc\multimodal_conversation.py", line 99, in call
File "dashscope\aigc\multimodal_conversation.py", line 170, in _preprocess_messages
File "dashscope\utils\oss_utils.py", line 241, in preprocess_message_element
File "dashscope\utils\oss_utils.py", line 216, in check_and_upload
File "dashscope\utils\oss_utils.py", line 180, in check_and_upload_local
File "dashscope\utils\oss_utils.py", line 83, in upload
File "requests\sessions.py", line 637, in post
File "requests\sessions.py", line 589, in request
File "requests\sessions.py", line 703, in send
File "requests\adapters.py", line 659, in send
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
TaskCfg(cache_folder='D:/Green Softwares/Videotrans/videotrans/tmp/15020/ee8775bb51', target_dir='c:/users/seamuswong/videos/pyvideotrans/recogn', remove_noise=False, is_separate=False, detect_language='ja', subtitle_language=None, source_language=None, target_language=None, source_language_code=None, target_language_code=None, source_sub=None, target_sub='c:/users/seamuswong/videos/pyvideotrans/recogn/VID_20240606_024452_298.srt', source_wav=None, source_wav_output=None, target_wav=None, target_wav_output=None, subtitles='', novoice_mp4=None, noextname='VID_20240606_024452_298', shibie_audio='D:/Green Softwares/Videotrans/videotrans/tmp/15020/ee8775bb51/VID_20240606_024452_298-1770120824.201244.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=6, model_name='tiny', voice_autorate=False, video_autorate=False, cuda=False, name='C:/Users/SeamusWong/Desktop/FFOutput/VID_20240606_024452_298/VID_20240606_024452_298.aac', basename='VID_20240606_024452_298.aac', ext='aac', dirname='C:/Users/SeamusWong/Desktop/FFOutput/VID_20240606_024452_298', shound_del_name=None, uuid='ee8775bb51', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, rephrase=1, only_out_mp4=False, fix_punc=False, recogn2pass=False)


=
system:Windows-10-10.0.19045-SP0
version:v3.95
frozen:True
language:zhimage

1 Replies

这是由于阿里百炼ASR服务在上传音频文件到其OSS(对象存储)时网络连接被中断导致的。

根据错误堆栈,问题发生在 dashscope.utils.oss_utils.pyupload 函数中,具体是 requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))。这表明软件尝试将你的音频文件上传到阿里云的临时存储空间时,连接被远程服务器(阿里云)意外关闭。

解决方案:

  1. 检查网络环境:虽然你已尝试墙内外网络,但此错误通常与网络不稳定、防火墙或代理设置有关。请确保你的网络连接稳定,并且没有防火墙或安全软件阻止 pyVideoTransPython 进程访问阿里云的服务地址。
  2. 配置网络代理:如果你在使用代理,请确保在软件的“网络代理”设置中正确填写了代理地址和端口。如果未使用代理,请尝试在“网络代理”设置中清空所有字段,确保软件直接连接。
  3. 尝试其他语音识别渠道:作为临时解决方案,可以切换到其他语音识别模型,例如:

    • 本地模型faster-whisper (需下载模型,但无需联网)。
    • 其他在线API:OpenAI Whisper API、字节火山极速版ASR等。
  4. 检查阿里百炼服务状态和配置

    • 确认你的阿里百炼API Key有效且有足够余额。
    • 登录阿里百炼控制台,检查Qwen3-ASR服务是否正常运行,以及是否有地域限制或调用频率限制。
    • 尝试在软件中重新保存一次阿里百炼的API Key配置。

请注意:翻译测试通过仅代表连接到阿里百炼的“翻译”或“模型集市”接口正常,但ASR功能可能使用了不同的服务端点或涉及文件上传流程,因此可能受到不同的网络策略影响。

请查阅相关文档:

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