mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:12:51 +00:00
fix: Whisper stt model
This commit is contained in:
parent
e8c6e75a09
commit
a568cfe893
|
|
@ -13,7 +13,7 @@ from models_provider.base_model_provider import BaseModelCredential, ValidCode
|
|||
|
||||
class VLLMWhisperModelParams(BaseForm):
|
||||
Language = forms.TextInputField(
|
||||
TooltipLabel(_('Language'),
|
||||
TooltipLabel(_('language'),
|
||||
_("If not passed, the default value is 'zh'")),
|
||||
required=True,
|
||||
default_value='zh',
|
||||
|
|
|
|||
|
|
@ -52,11 +52,11 @@ class VllmWhisperSpeechToText(MaxKBBaseModel, BaseSpeechToText):
|
|||
api_key=self.api_key,
|
||||
base_url=base_url
|
||||
)
|
||||
|
||||
buf = audio_file.read()
|
||||
filter_params = {k: v for k, v in self.params.items() if k not in {'model_id', 'use_local', 'streaming'}}
|
||||
transcription_params = {
|
||||
'model': self.model,
|
||||
'file': audio_file,
|
||||
'file': buf,
|
||||
'language': 'zh',
|
||||
}
|
||||
result = client.audio.transcriptions.create(
|
||||
|
|
|
|||
Loading…
Reference in New Issue