Baghdad99 commited on
Commit
cd1000f
1 Parent(s): 92e7cff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -24,8 +24,7 @@ def translate_speech(audio_file):
24
  print(f"Type of audio: {type(audio_file)}, Value of audio: {audio_file}") # Debug line
25
 
26
  # Use the ASR pipeline to transcribe the audio
27
- with open(audio_file.name, "rb") as f: # Change this line
28
- data = f.read()
29
  output = query(ASR_API_URL, data=data)
30
  transcription = output["text"]
31
 
 
24
  print(f"Type of audio: {type(audio_file)}, Value of audio: {audio_file}") # Debug line
25
 
26
  # Use the ASR pipeline to transcribe the audio
27
+ data = audio_file.read()
 
28
  output = query(ASR_API_URL, data=data)
29
  transcription = output["text"]
30