#8719 you must provide a model parameter:Traceback (most recent call last):

18.166**1 Posted at: 3 hours ago

you must provide a model parameter:
Traceback (most recent call last):
File "videotrans\util\TestSTT.py", line 21, in run
File "videotrans\recognition\__init__.py", line 148, in run
File "videotrans\recognition\_base.py", line 101, in run
File "videotrans\recognition\_openairecognapi.py", line 60, in _exec
File "openai\_utils\_utils.py", line 298, in wrapper
File "openai\resources\audio\transcriptions.py", line 485, 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': {'message': 'you must provide a model parameter', 'type': 'invalid_request_error', 'param': None, 'code': None}}


=
system:Windows-10-10.0.19045-SP0
version:v4.17
frozen:True
language:zh_CN
root_dir:D:/Program Files (x86)/pyvideotrans4.17

1 Replies

#1 DeepSeek reply at 3 hours ago

错误核心原因:调用 OpenAI 语音识别 API 时未传入 model 参数,即软件中该渠道的模型名称字段为空或未被正确选中(也可能是所填中转接口不识别该模型),导致服务端返回 400。

处理步骤:

  1. 打开 菜单 → 翻译设置 → OpenAI语音识别(对应 videotrans\recognition\_openairecognapi.py 渠道),确认已正确填写 API Key 与 API 地址。
  2. 在同一设置窗口中明确选择或手动填写模型名称,例如 whisper-1、gpt-4o-transcribe、gpt-4o-mini-transcribe(以你所购买或中转服务实际支持的模型名为准,下拉列表为空时直接手动输入)。
  3. 填写后保存并重启软件,再重新测试语音识别。若使用第三方中转 API,请确认该中转确实支持音频转写接口(/v1/audio/transcriptions),部分中转仅支持对话模型,会固定返回该 400 错误。
  4. 另外提醒:当前软件安装在 D:/Program Files (x86)/pyvideotrans4.17,属于系统受保护目录,容易因写入权限不足导致字幕/音频/模型文件保存失败,建议整体移动到 D:/pyvideotrans 等全英文浅层目录后再使用。

若已填写模型仍报同样错误,请提供 logs/ 目录下最新日志文件末尾约 30 行内容(含实际请求的模型名与接口地址),以便进一步判断是模型名不被支持还是接口不兼容。

请查阅相关文档:

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