From 8219921fcaecfad7ba4466a0f790757db4df3de9 Mon Sep 17 00:00:00 2001 From: Guillaume Chervet Date: Fri, 1 Nov 2024 15:56:00 +0100 Subject: [PATCH] start cleanning --- README.md | 1 + production/ia-worker/app/main.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6ea0af5..da5f306 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Poc Whisper +This project is a proof of concept to transcribe audio in real-time using a serverless architecture. ## Getting Started diff --git a/production/ia-worker/app/main.py b/production/ia-worker/app/main.py index 7e74f1c..2ac1de7 100644 --- a/production/ia-worker/app/main.py +++ b/production/ia-worker/app/main.py @@ -83,8 +83,10 @@ async def transcription_worker(): await asyncio.sleep(0.1) -# Démarrer le worker de transcription en arrière-plan -asyncio.create_task(transcription_worker()) +@app.on_event("startup") +async def startup_event(): + # Démarrer le worker de transcription en arrière-plan + asyncio.create_task(transcription_worker()) async def transcribe_audio(client_id, chunk_data, chunk_index, app_settings, http_service):