From 277e7aead7d9e9f23e0d2bcc1759b3fd384d9d1f Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 8 Jun 2024 00:52:19 -0700 Subject: [PATCH] refac --- backend/apps/audio/main.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/backend/apps/audio/main.py b/backend/apps/audio/main.py index df61e701c..7b6ff3321 100644 --- a/backend/apps/audio/main.py +++ b/backend/apps/audio/main.py @@ -273,7 +273,11 @@ def transcribe( with open(transcript_file, "w") as f: json.dump({"transcript": transcript}, f) - return {"text": transcript.strip()} + data = {"text": transcript.strip()} + + print(data) + + return data elif app.state.config.STT_ENGINE == "openai": headers = {"Authorization": f"Bearer {app.state.config.STT_OPENAI_API_KEY}"} @@ -291,7 +295,10 @@ def transcribe( ) r.raise_for_status() - return r.json() + + data = r.json() + print(data) + return data except Exception as e: log.exception(e) error_detail = "Open WebUI: Server Connection Error"