#687 </html>

*345:4606* Posted at: 11 hours ago 👁5

405 Not Allowed

405 Not Allowed

nginx

:Traceback (most recent call last):

File "videotrans\util\TestSTT.py", line 18, in run

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

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

File "tenacity\__init__.py", line 480, in __call__

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

File "videotrans\recognition\_openairecognapi.py", line 108, in _thrid_api

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

File "openai\resources\audio\transcriptions.py", line 333, in create

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

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

openai.APIStatusError:

405 Not Allowed

405 Not Allowed

nginx

=====

Windows-10-10.0.26100-SP0

version:v3.80

frozen:True

language:zh

1 Replies

本条内容由 DeepSeek 回复
这个问题是由于在使用 OpenAI API 进行语音识别时,服务器返回了 "405 Not Allowed" 错误。这通常意味着您配置的 OpenAI API 端点(Base URL)不正确或不被支持。

核心原因与解决方案:

1. 检查并更正 API 端点: 您很可能在软件设置中为 OpenAI 语音识别配置了一个自定义的 API 基础 URL(例如,某个代理地址或中转服务地址),但该地址不支持语音识别(Transcriptions)功能。请按照以下步骤检查和修改:

  • 打开 pyVideoTrans 软件。
  • 在语音识别设置区域,找到并选择 "OpenAI-api识别"。
  • 检查 "API接口地址(Base URL)" 这一项。如果您没有使用自定义代理,请确保此项为空或填写 OpenAI 官方地址 https://api.openai.com/v1
  • 如果您确实在使用代理服务,请确认该代理服务商明确支持 audio/transcriptions 这个 API 接口。很多代理或中转服务可能只支持聊天(Chat)接口,而不支持语音识别接口。

2. 验证 API 密钥: 同时,请确保您填写的 OpenAI API 密钥是有效且具有足够余额的。

详细分析:

  • 从错误日志 videotrans\recognition\_openairecognapi.py 可以看出,问题发生在调用 OpenAI 的语音识别 API 时。
  • 错误信息 <html><head><title>405 Not Allowed</title></head>... 是一个标准的 HTTP 状态码,表示客户端使用了一个不被目标服务器允许的 HTTP 方法(如 GET, POST 等)来访问某个 URL。在这里,很可能是软件向您配置的 API 地址发送了 POST 请求,但该地址的服务器(由 nginx 驱动)认为这个请求方法对于该路径是无效的。
  • 这强烈指向了 API 基础 URL 配置错误。软件试图向一个不支持语音识别功能的地址发送请求,因此被服务器拒绝。

操作步骤总结:

1. 打开 pyVideoTrans 设置。

2. 找到 OpenAI 语音识别的配置部分。

3. 将 "API接口地址(Base URL)" 修改为正确的地址(官方地址或确认支持语音识别的代理地址)。

4. 保存设置后,再次尝试语音识别功能。

如果问题依旧存在,请检查您的网络连接或代理设置是否正常。

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.

Donate: https://ko-fi.com/jianchang512

Trending Questions