Refactor file processing to use asyncio for transcribing, improving concurrency. (#24379)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user