Baghdad99 commited on
Commit
d53b668
·
1 Parent(s): bc3fe61

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -20,7 +20,7 @@ def translate_speech(audio_data_tuple):
20
  sf.write(temp_audio_file.name, audio_data, sample_rate)
21
 
22
  # Prepare the input dictionary
23
- input_dict = asr_processor(temp_audio_file.name, return_tensors="pt", padding=True)
24
 
25
  # Use the ASR model to get the logits
26
  logits = asr_model(input_dict.input_values.to("cpu")).logits
 
20
  sf.write(temp_audio_file.name, audio_data, sample_rate)
21
 
22
  # Prepare the input dictionary
23
+ input_dict = asr_processor(audio_data, sampling_rate=sample_rate, return_tensors="pt", padding=True)
24
 
25
  # Use the ASR model to get the logits
26
  logits = asr_model(input_dict.input_values.to("cpu")).logits