#8768 OpenAI STT API: you must provide a model parameterTraceback (most recent call last):

37.228**8 Posted at: 12 hours ago

OpenAI STT API: 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.18363-SP0
version:v4.18
frozen:True
language:en_US
root_dir:C:/PYVideo/pyvideotrans

5 Replies

#1 DeepSeek reply at 12 hours ago

Cause: the OpenAI speech recognition channel did not send a model name to the API, so OpenAI returned 400 you must provide a model parameter. This is not a network or key issue: the Model field in the channel settings is empty, and the request therefore contains no model parameter.

Solution:

  1. Open Menu -> Translation Settings -> OpenAI (the settings window for the OpenAI STT API).
  2. Fill in the Model field with a speech recognition model name, such as whisper-1 or gpt-4o-transcribe (if you use a relay/third-party API, fill in a model name that the relay supports).
  3. Make sure the SK and API URL are also filled in correctly (for the official API, leave the URL empty or set it to the official address; do not use 0.0.0.0, use 127.0.0.1 for local services).
  4. Save and reselect the OpenAI STT API channel, then click Test again.

If the error still occurs after the model name is filled in, provide the latest log in the logs/ folder under C:/PYVideo/pyvideotrans.

Please refer to the related documentation:

#2 37.228**8 reply at 12 hours ago

может надо открывать не Translation Settings а Speech Recognition Settings?

#3 DeepSeek reply at 12 hours ago

Да, для канала распознавания речи нужно открывать настройки канала распознавания речи (Speech Recognition / ASR), а не Translation Settings — там настраиваются каналы перевода субтитров. Важно не название пункта меню, а чтобы открылось окно параметров именно канала OpenAI STT API (OpenAI Speech to Text).

Порядок:

  1. Откройте в верхнем меню раздел настроек каналов распознавания речи (Speech Recognition / ASR Settings) и выберите OpenAI (OpenAI STT API).
  2. Заполните поле Model названием модели распознавания, например whisper-1 или gpt-4o-transcribe; при работе через сторонний/relay API укажите модель, которую поддерживает этот API.
  3. Проверьте SK и API URL: для официального API URL оставьте пустым или укажите официальный адрес; 0.0.0.0 использовать нельзя, для локальных сервисов — 127.0.0.1.
  4. Сохраните, заново выберите канал OpenAI STT API и нажмите тест.

Если после заполнения Model ошибка 400 сохраняется, пришлите последние строки лога из папки logs/ в C:/PYVideo/pyvideotrans.

Please refer to the related documentation:

#4 37.228**8 reply at 12 hours ago

ты не даешь запостить текст из файла

#5 DeepSeek reply at 12 hours ago

Ограничение на вставку длинного текста относится к интерфейсу страницы вопросов, а не к самой программе pyVideoTrans; в базе знаний информации об этом нет, поэтому точную причину назвать нельзя.Что можно сделать:вставляйте не весь файл, а только последние 20–30 строк лога с текстом ошибки;если нужен полный лог, приложите файл logs/ГГГГММДД.log к сообщению на странице поддержки/GitHub Issues, а не вставляйте его в поле ввода;при разбиении на части отправляйте их последовательно, по одному фрагменту.Если нужно, чтобы я разобрал ошибку OpenAI STT API, достаточно прислать: версию (у вас v4.18), ОС (Windows 10), и 20–30 последних строк лога из C:/PYVideo/pyvideotrans/logs/.### Please refer to the related documentation:- Technical support

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