diff --git a/backend/open_webui/routers/audio.py b/backend/open_webui/routers/audio.py index c4a187b50d..100610a83a 100644 --- a/backend/open_webui/routers/audio.py +++ b/backend/open_webui/routers/audio.py @@ -550,7 +550,7 @@ def transcription_handler(request, file_path, metadata): metadata = metadata or {} languages = [ - metadata.get("language", None) if WHISPER_LANGUAGE == "" else WHISPER_LANGUAGE, + metadata.get("language", None) if not WHISPER_LANGUAGE else WHISPER_LANGUAGE, None, # Always fallback to None in case transcription fails ]