#7566 :Traceback (most recent call last):

18.167**3 Posted at: 1 hour ago

:
Traceback (most recent call last):
File "videotrans\util\TestSTT.py", line 21, in run
File "videotrans\recognition\__init__.py", line 121, in run
File "videotrans\recognition\_base.py", line 99, in run
File "videotrans\recognition\_openairecognapi.py", line 58, in _exec
File "openai\_client.py", line 194, in init
openai.OpenAIError: Missing credentials. Please pass an api_key, workload_identity, admin_api_key, or set the OPENAI_API_KEY or OPENAI_ADMIN_KEY environment variable.


=
system:Windows-10-10.0.19045-SP0
version:v4.13
frozen:True
language:zh_CN
root_dir:C:/Users/Administrator/Desktop/win-pyvideotrans-v4.13-1

1 Replies

#1 DeepSeek reply at 1 hour ago

核心原因:你选择了 OpenAI 语音识别API 渠道,但未填写 OpenAI 的 API Key(或 Key 为空),导致 openai 客户端初始化时抛出 Missing credentials 错误。

解决方案:

  1. 点击软件顶部菜单 翻译设置(或 设置)→ 找到 OpenAI 相关设置项,在 API Key(SK 密钥)栏中填入有效的 OpenAI 密钥;若使用国内中转/兼容接口,还需同时填写对应的 API 地址

  2. 保存后重新执行任务。

  3. 若你并没有 OpenAI 密钥,也不想使用该渠道:回到主界面 语音识别(STT Service) 下拉框,把渠道从 OpenAI 语音识别API 改回 faster-whisper(内置)(默认推荐,本地免费),避免误选在线 API 渠道。

补充说明:只要选择了任何在线 API 类识别渠道,都必须先在该渠道对应的设置窗口里填写密钥,否则都会出现类似 Missing credentials 的报错。

请查阅相关文档:

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