Browse Source

Update audio.py - fix FORMAT error

Fix  FORMAT error
_00_ 2 months ago
parent
commit
51758c429b
1 changed files with 6 additions and 1 deletions
  1. 6 1
      backend/open_webui/routers/audio.py

+ 6 - 1
backend/open_webui/routers/audio.py

@@ -561,7 +561,12 @@ def transcription_handler(request, file_path, metadata):
             file_path,
             beam_size=5,
             vad_filter=request.app.state.config.WHISPER_VAD_FILTER,
-            language=metadata.get("language",None) if WHISPER_LANGUAGE=="" else WHISPER_LANGUAGE,
+            language=(
+                metadata.get("language", None)
+                if WHISPER_LANGUAGE == ""
+                else WHISPER_LANGUAGE
+            ),
+        )            
         )
         log.info(
             "Detected language '%s' with probability %f"