Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAl在线api语音识别使用第三方时报错"'TranscriptionSegment' object is not subscriptable" #687

Open
xwxYa opened this issue Dec 23, 2024 · 4 comments

Comments

@xwxYa
Copy link

xwxYa commented Dec 23, 2024

出错信息
image
image
Traceback (most recent call last): File "videotrans\recognition\_base.py", line 73, in run File "videotrans\recognition\_openairecognapi.py", line 82, in _exec TypeError: 'TranscriptionSegment' object is not subscriptable 2024-12-23 18:45:22,903 - VideoTrans - ERROR - 'TranscriptionSegment' object is not subscriptable

复现步骤

  1. 使用OpenAl在线api语音识别功能
  2. 填写第三方API URL与SK
  3. 使用模型whisper-1
    (已确认该api可用并且有whisper-1模型)

操作系统

  • Windows11

使用版本
v3.41

@xwxYa xwxYa changed the title OpenAl在线api语音识别使用第三方时报错 OpenAl在线api语音识别使用第三方时报错"'TranscriptionSegment' object is not subscriptable" Dec 23, 2024
@xwxYa
Copy link
Author

xwxYa commented Dec 23, 2024

另外不知为何我找不到videotrans\recognition_openairecognapi.py文件
image

@jianchang512
Copy link
Owner

第三方api不支持返回带时间戳的格式,无法制作字幕,请使用openai官方

@xwxYa
Copy link
Author

xwxYa commented Dec 23, 2024

第三方api不支持返回带时间戳的格式,无法制作字幕,请使用openai官方

可以通过中间层如Flask或FastAPI对返回的转录结果适配来生成符合需求的格式吗?

@gsessylu
Copy link

gsessylu commented Dec 23, 2024

按照教程https://pyvideotrans.com/groq
使用groq也出现TranscriptionSegment' object is not subscriptable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants