fix: Whisper stt model

This commit is contained in:
zhangzhanwei 2025-11-12 11:30:51 +08:00
parent 10dbda23bc
commit 2194b8b8cb
2 changed files with 3 additions and 3 deletions

View File

@ -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',

View File

@ -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(