From b31dd11a45a19c8e10616bb1346fdc176e9d789b Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751NSS@gmail.com> Date: Wed, 25 Dec 2024 11:36:27 +0700 Subject: [PATCH] feat: add common version mange --- internal/stt/assemblyai/assemblyai.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/stt/assemblyai/assemblyai.go b/internal/stt/assemblyai/assemblyai.go index c3609c5..fa70b56 100644 --- a/internal/stt/assemblyai/assemblyai.go +++ b/internal/stt/assemblyai/assemblyai.go @@ -43,10 +43,11 @@ func (s *STT) transcribeFromURL(audioURL string) (string, error) { ctx := context.Background() params := &aai.TranscriptOptionalParams{ - LanguageDetection: aai.Bool(false), // 禁用语言检测 - LanguageCode: "en", - FormatText: aai.Bool(true), - Punctuate: aai.Bool(true), + LanguageDetection: aai.Bool(true), + LanguageConfidenceThreshold: aai.Float64(0.1), + // LanguageCode: "en", + FormatText: aai.Bool(true), + Punctuate: aai.Bool(true), } transcript, err := s.client.Transcripts.TranscribeFromURL(ctx, audioURL, params)