From bb47e816e207f964252df6700a4cde652d7ac731 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751NSS@gmail.com> Date: Wed, 25 Dec 2024 11:35:24 +0700 Subject: [PATCH] feat: add common version mange --- internal/stt/assemblyai/assemblyai.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/internal/stt/assemblyai/assemblyai.go b/internal/stt/assemblyai/assemblyai.go index 6dee50c..c3609c5 100644 --- a/internal/stt/assemblyai/assemblyai.go +++ b/internal/stt/assemblyai/assemblyai.go @@ -42,13 +42,11 @@ func (s *STT) Recognize(audioData []byte, audioURL string) (string, error) { func (s *STT) transcribeFromURL(audioURL string) (string, error) { ctx := context.Background() - // 首次尝试:启用语言检测 params := &aai.TranscriptOptionalParams{ - LanguageDetection: aai.Bool(true), - // LanguageConfidenceThreshold: aai.Float64(0.5), - LanguageCode: "zh", - FormatText: aai.Bool(true), - Punctuate: aai.Bool(true), + LanguageDetection: aai.Bool(false), // 禁用语言检测 + LanguageCode: "en", + FormatText: aai.Bool(true), + Punctuate: aai.Bool(true), } transcript, err := s.client.Transcripts.TranscribeFromURL(ctx, audioURL, params)