usamaijaz-ai commited on
Commit
3a2bf29
·
1 Parent(s): 74336ce
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -126,8 +126,12 @@ def process_input(audio_file, video_file, video_url):
126
 
127
  label, confidence, top5 = classify_accent(audio_path)
128
  transcription = transcribe_audio(audio_path)
 
 
129
 
130
- return f"Top prediction: {label}", confidence, label, audio_path, top5, transcription
 
 
131
 
132
  except Exception as e:
133
  return f"Error: {str(e)}", None, None, None, None, None
 
126
 
127
  label, confidence, top5 = classify_accent(audio_path)
128
  transcription = transcribe_audio(audio_path)
129
+ with open(audio_path, "rb") as f:
130
+ audio_bytes = f.read()
131
 
132
+ return f"Top prediction: {label}", confidence, label, (audio_bytes, "converted_audio.wav"), top5, transcription
133
+
134
+ # return f"Top prediction: {label}", confidence, label, audio_path, top5, transcription
135
 
136
  except Exception as e:
137
  return f"Error: {str(e)}", None, None, None, None, None