#7004 ASR Error[XiaoMi] Request failedhttps://api.xiaomimimo.com/v1

139.144**2 Posted at: 2 hours ago

ASR Error[XiaoMi] Request failed
https://api.xiaomimimo.com/v1
Traceback (most recent call last):

File "videotrans\recognition\_xiaomiasr.py", line 45, in _exec

File "openai\_utils\_utils.py", line 298, in wrapper

File "openai\resources\chat\completions\completions.py", line 1215, in create

File "openai\_base_client.py", line 1332, in post

File "openai\_base_client.py", line 1105, in request

openai.BadRequestError: Error code: 400 - {'error': {'code': '400', 'message': 'Request failed', 'param': 'Connection prematurely closed BEFORE response', 'type': ''}}

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

Traceback (most recent call last):

File "videotrans\task\job.py", line 35, in run

File "videotrans\task\job.py", line 100, in process_task

File "videotrans\task\speech2text.py", line 97, in recogn

File "videotrans\recognition\__init__.py", line 206, in run

File "videotrans\recognition\_base.py", line 92, in run

File "videotrans\recognition\_xiaomiasr.py", line 73, in _exec

videotrans.configure.excepts.StopTask: Request failed
https://api.xiaomimimo.com/v1
cfg=TaskCfgSTT(uuid='7bd82eece8', name='C:/Users/AppData/Local/Claude-3p/local-agent-mode-sessions/d07734d1/00000000/4969abce/outputs/audio_knowii.mp3', dirname='C:/Users/AppData/Local/Claude-3p/local-agent-mode-sessions/d07734d1/00000000/4969abce/outputs', noextname='audio_knowii', basename='audio_knowii.mp3', ext='mp3', target_dir='D:/App/output/recogn', cache_folder='D:/App/pyVideo/tmp/17332/7bd82eece8', is_cuda=False, source_language=None, source_language_code=None, source_sub=None, source_wav=None, source_wav_output=None, target_language=None, target_language_code=None, target_sub='D:/App/output/recogn/audio_knowii.srt', target_wav=None, target_wav_output=None, detect_language='auto', recogn_type=11, model_name='tiny', shibie_audio='D:/App/pyVideo/tmp/17332/7bd82eece8/audio_knowii-1788280310.0907547.wav', remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=0)


=
system:Windows-10-10.0.19045-SP0
version:v4.07
frozen:True
language:en
root_dir:D:/App/pyVideo

1 Replies

#1 DeepSeek reply at 2 hours ago

The core cause is that the Xiaomi MiMo ASR API (api.xiaomimimo.com) rejected your request with a 400 Bad Request error. The message Connection prematurely closed BEFORE response indicates the server closed the connection without returning a valid response — this typically happens when the request parameters are malformed, the API key is invalid/misconfigured, or the language detection setting (auto) is not accepted by the API.

You are running v4.07, which is outdated. The current version is v4.11.

Fixes in order:

  1. Set the source language explicitly instead of auto.
    The Xiaomi MiMo ASR model (mimo-v2.5-asr) is optimized for Chinese / Chinese-English mixed audio. The detect_language='auto' parameter is often rejected by this API. Go to the 语音转录 panel and select the actual audio language (e.g., zh-cn or en).
  2. Verify the Xiaomi API key and balance.
    Make sure you have entered a valid API key in 菜单 → 翻译设置 → 小米AI and that your account has sufficient credit. An invalid or expired key can cause the server to immediately drop the connection.
  3. Upgrade to v4.11.
    Download the latest full package or patch from pyvideotrans.com/downpackage and overwrite your installation folder (save your videotrans/params.json and videotrans/cfg.json first if you want to keep your settings).
  4. If the error persists, switch to a built-in channel such as faster-whisper(内置) — it works offline and does not depend on the Xiaomi API.

Please consult related documentation:

If none of the above resolves it, please provide the full error log from logs/ folder (the latest date-named .log file) for further analysis.

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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

Related resource