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

feat(audio): count whisper-1 quota by audio duration #944

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

WqyJh
Copy link
Contributor

@WqyJh WqyJh commented Jan 17, 2024

whisper-1 模型的计费仅由输入的语音时长决定,one-api 当前的实现是按输出的文本计算的估计值。

image

本 PR 实现了基于输入语音时长的计费方案,依赖 ffprobe 读取音频文件的时长,支持 openai 允许的所有格式,包括 mp3, mp4, mpeg, mpga, m4a, wav, 和 webm。

我已确认该 PR 已自测通过,相关截图如下:
image

@songquanpeng
Copy link
Owner

收到,我会尽快处理该 PR

@songquanpeng songquanpeng added the priority This will have high priority. label Jan 20, 2024
@songquanpeng
Copy link
Owner

冲突我来处理

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

Successfully merging this pull request may close these issues.

None yet

2 participants