QuantumNous / QuantumNous/new-api
无法调用Groq渠道的Whisper模型处理 .wav 音频文件,报错“令牌无权访问模型”
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 48.5k
- Forks
- 11.6k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 58
Description
例行检查
- 我已确认目前没有类似 issue
- 我已确认我已升级到最新版本
- 我已完整查看过项目 README,尤其是常见问题部分
- 我理解并愿意跟进此 issue,协助测试和提供反馈
- 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭
问题描述
在new-api中添加groq渠道,测试groq的whisper模型,发现对于 .wav的音频文件无法调用模型。
报错{"error":{"message":"该令牌无权访问模型 whisper-large-v3-turbo (request id: 20250410005049655360160lkh0pltW)","type":"new_api_error"}}
无论是使用"Content-Type: multipart/form-data" ,失败
curl http://127.0.0.1:3031/v1/audio/transcriptions \
-H "Authorization: Bearer sk-4tv7Of7QJJVWA1fKmYHYkGyRWYOeD5c373fXoSGZkcAgECYp" \
-H "Content-Type: multipart/form-data" \
-F file="@/Users/bulejames/Downloads/20250410 0034 record-yourself.wav" \
-F model=whisper-large-v3-turbo
{"error":{"message":"该令牌无权访问模型 whisper-large-v3-turbo (request id: 20250410005049655360160lkh0pltW)","type":"new_api_error"}}
还是 "Content-Type: audio/wav",失败
curl http://127.0.0.1:3031/v1/audio/transcriptions \
-H "Authorization: Bearer sk-4tv7Of7QJJVWA1fKmYHYkGyRWYOeD5c373fXoSGZkcAgECYp" \
-H "Content-Type: audio/wav" \
-F file="@/Users/bulejames/Downloads/20250410 0034 record-yourself.wav" \
-F model=whisper-large-v3-turbo
{"error":{"message":"该令牌无权访问模型 whisper-1 (request id: 20250410004936408826757hPnZTt30)","type":"new_api_error"}}
但是使用 .mp3格式的音频文件就可以正常调用
curl http://127.0.0.1:3031/v1/audio/transcriptions \
-H "Authorization: Bearer sk-a1LnjRU5RSVWEk9Z8scvmO0iYlOHWHSgCwyUu0FgHcryFNq7" \
-H "Content-Type: multipart/form-data" \
-F file="@/Users/bulejames/Downloads/20250104 1128 Recording.mp3" \
-F model=whisper
{"text":" I saw her at the meeting.","x_groq":{"id":"req_01jrdqb5jcfxqsmrtrqkdn78s5"}}
复现步骤
shell命令
curl http://127.0.0.1:3031/v1/audio/transcriptions \
-H "Authorization: Bearer sk-4tv7Of7QJJVWA1fKmYHYkGyRWYOeD5c373fXoSGZkcAgECYp" \
-H "Content-Type: audio/wav" \
-F file="@/Users/bulejames/Downloads/20250410 0034 record-yourself.wav" \
-F model=whisper-large-v3-turbo
预期结果
正常调用groq的whisper模型转录成功
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the reported curl reproduction against /v1/audio/transcriptions and inspect the request path handling Groq Whisper uploads. Compare the WAV and MP3 behavior and model selection; done means a WAV upload reaches Groq and returns a transcription without the token or model-access error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, audio-video-rtc
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100