From 5e6053f4a013b935279c97e5c0f09f60f2f400f0 Mon Sep 17 00:00:00 2001 From: kumarpanzade Date: Thu, 26 Sep 2024 11:08:53 +0530 Subject: [PATCH] add temp logs --- service/audio_service.py | 1 + service/main.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/service/audio_service.py b/service/audio_service.py index da37779..cf5d8e2 100644 --- a/service/audio_service.py +++ b/service/audio_service.py @@ -21,6 +21,7 @@ def translate_with_whisper(audioPath): logger.info("Started transciption through whishper") # audio_tensor = np_array_to_tensor(audio) # stft_result = perform_stft(audio_tensor) + print("----------------",audioPath,"---------------------") options = dict(beam_size=5, best_of=5) translate_options = dict(task="translate", **options) result = model.transcribe(audioPath,**translate_options) diff --git a/service/main.py b/service/main.py index da8d800..cf5afb4 100644 --- a/service/main.py +++ b/service/main.py @@ -38,7 +38,7 @@ async def upload_audio(body: Body): translation = translate_with_whisper(body.audio_file_link) logger.info("translation done") - print("---------- -----------summary started-----------------------") + print("---------------------summary started-----------------------") #summary = summarize_using_openai(translation) summary = summarize_using_openai(translation) @@ -47,4 +47,5 @@ async def upload_audio(body: Body): return JSONResponse(content={"message": "File processed successfully!", "translation":translation, "summary": summary}, status_code=200) except Exception as e: + print("---------------",e,"-------------------") return JSONResponse(content={"message": str(e)}, status_code=500)