点击查看 Edge-TTS 配音渠道无法使用的解决办法!!!

#2006 OpenaiAPIRecogn.__init__() got an unexpected keyword argument 'detect_language'

38.75* Posted at: 6 hours ago 👁12

OpenaiAPIRecogn.__init__() got an unexpected keyword argument 'detect_language'


=
system:macOS-15.6.1-arm64-arm-64bit
version:v3.86
frozen:False
language:zh
root_dir:/Users/changfubin/Documents/BOS巴菲特课程/量化交易课程/pyvideotrans
Python: 3.11.14 (main, Oct 9 2025, 16:16:55) [Clang 17.0.0 (clang-1700.4.4.1)]

1 Replies

这个错误表明您使用的 OpenAI 语音识别模块 (OpenaiAPIRecogn) 的初始化函数不支持 detect_language 这个参数。这通常是由于软件版本与代码不匹配,或者您可能手动修改了某些文件。

请按以下步骤排查:

  1. 检查软件完整性:如果您是通过 git clone 方式安装的,请确保您没有手动修改过 pyvideotrans/recogn/openai.py 或相关文件。可以尝试从官方仓库重新拉取最新代码。
  2. 回退到稳定版本:v3.86 可能存在此兼容性问题。建议您回退到上一个稳定版本 v3.85。

  3. 临时解决方案:如果您必须使用 v3.86,可以尝试在软件设置中,将语音识别模型从 OpenAI 切换到其他模型(如 faster-whisper阿里FunASR)来规避此错误。

如果问题依旧,请提供完整的错误日志(位于软件根目录下的 logs 文件夹中),以便进一步分析。

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