diff --git a/backend/open_webui/routers/audio.py b/backend/open_webui/routers/audio.py index d6f74eac4..ea1372623 100644 --- a/backend/open_webui/routers/audio.py +++ b/backend/open_webui/routers/audio.py @@ -625,7 +625,9 @@ def transcription( ): log.info(f"file.content_type: {file.content_type}") - if file.content_type not in ["audio/mpeg", "audio/wav", "audio/ogg", "audio/x-m4a"]: + supported_filetypes = ("audio/mpeg", "audio/wav", "audio/ogg", "audio/x-m4a") + + if not file.content_type.startswith(supported_filetypes): raise HTTPException( status_code=status.HTTP_400_BAD_REQUEST, detail=ERROR_MESSAGES.FILE_NOT_SUPPORTED,