Skip to content

Commit

Permalink
Merge pull request #83 from SunbirdAI/add_audio_auto_detection
Browse files Browse the repository at this point in the history
 Added logs
  • Loading branch information
yigagilbert authored Oct 31, 2024
2 parents f1f81a5 + c988be3 commit 2585be0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/routers/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,7 @@ def handle_openai_message(
# Step 5: Initialize the Runpod endpoint for transcription
endpoint = runpod.Endpoint(RUNPOD_ENDPOINT_ID)

logging.info('Audio data found for langauge detection')
data = {
"input": {
"task": "auto_detect_audio_language",
Expand All @@ -778,9 +779,8 @@ def handle_openai_message(
start_time = time.time()

try:

logging.info('Audio file ready for langauge detection')
audio_lang_response = call_endpoint_with_retry(endpoint, data)

except TimeoutError as e:

logging.error('Job timed out %s', str(e))
Expand Down

0 comments on commit 2585be0

Please sign in to comment.