From 7c4b7f80d9c342b4b028927655f0e26b46046d7e Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751NSS@gmail.com> Date: Mon, 30 Dec 2024 16:13:30 +0700 Subject: [PATCH] feat: add whisper git config? --- internal/stt/whisper/whisper.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/stt/whisper/whisper.go b/internal/stt/whisper/whisper.go index d18dacc..0373973 100644 --- a/internal/stt/whisper/whisper.go +++ b/internal/stt/whisper/whisper.go @@ -43,6 +43,11 @@ func NewWhisperSTT() *WhisperSTT { } func (w *WhisperSTT) Recognize(audioData []byte, audioURL string) (string, error) { + if w.model != "whisper-v3-turbo" { + logger.Warnf("检测到不正确的模型名称: %s,自动修正为: whisper-v3-turbo", w.model) + w.model = "whisper-v3-turbo" + } + body := &bytes.Buffer{} writer := multipart.NewWriter(body)