From 8b78821ba4c65529d71fe080c0f354f0ab814347 Mon Sep 17 00:00:00 2001 From: Jacob Leksan <63938553+jmleksan@users.noreply.github.com> Date: Fri, 8 May 2026 14:17:47 -0400 Subject: [PATCH] Refactor file processing to use asyncio for transcribing, improving concurrency. (#24379) --- backend/open_webui/routers/files.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/open_webui/routers/files.py b/backend/open_webui/routers/files.py index 7ca1c2e73f..86beeec188 100644 --- a/backend/open_webui/routers/files.py +++ b/backend/open_webui/routers/files.py @@ -125,7 +125,13 @@ async def process_uploaded_file( if strict_match_mime_type(stt_supported_content_types, content_type): file_path_processed = await asyncio.to_thread(Storage.get_file, file_path) - result = transcribe(request, file_path_processed, file_metadata, user) + result = await asyncio.to_thread( + transcribe, + request, + file_path_processed, + file_metadata, + user, + ) await process_file( request,