#6112 语音识别阶段出错[小米] Param Incorrecthttps://api.xiaomimimo.com/v1

23.142* Posted at: 2 hours ago

语音识别阶段出错[小米] Param Incorrect
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': 'Param Incorrect', 'param': 'input_audio.data exceeds maximum size of 10MB', '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 205, in run

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

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

videotrans.configure.excepts.StopTask: Param Incorrect
https://api.xiaomimimo.com/v1
cfg=TaskCfgSTT(uuid='d8c75bc88c', name='E:/z_temp/Semana 07_.mp4', dirname='E:/z_temp', noextname='Semana 07_', basename='.mp4', ext='mp4', target_dir='D:/App/videorans/output/recogn', cache_folder='D:/App/videorans/tmp/6344/d8c75bc88c', is_cuda=True, 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/videorans/output/recogn/Semana 07_.srt', target_wav=None, target_wav_output=None, detect_language='auto', recogn_type=11, model_name='large-v3', shibie_audio='D:/App/videorans/tmp/6344/d8c75bc88c/07_-1785146814.0437257.wav', remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=0)


=
system:Windows-10-10.0.26200-SP0
version:v4.05
frozen:True
language:zh
root_dir:D:/App/videorans

1 Replies

该错误是由于小米语音识别API对上传音频文件的大小限制为10MB,你的音频文件超过了该限制。

解决方案如下:

  1. 压缩音频:在软件主界面点击「设置更多参数」,开启「降噪」或降低音频采样率。或使用外部工具(如FFmpeg、Audacity)将音频比特率降至32k16k,缩小文件体积。
  2. 缩短音频时长:如果视频较长,可先剪辑出需要翻译的片段,或使用「批量语音转录」功能,软件会自动按VAD分割音频片段处理。
  3. 更换语音识别渠道:推荐使用内置的faster-whisper(本地内置),选择large-v3模型,无文件大小限制,且支持CUDA加速(你当前已勾选CUDA,可直接使用)。

请查阅相关文档:

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