Baghdad99 commited on
Commit
de1b6c1
1 Parent(s): 5dbc4ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -15,7 +15,7 @@ def translate_speech(audio_input):
15
  audio_data, sample_rate = librosa.load(audio_input, sr=None)
16
 
17
  # Prepare the input dictionary
18
- input_dict = asr_processor(audio_data, return_tensors="pt", padding=True)
19
 
20
  # Use the ASR model to get the logits
21
  logits = asr_model(input_dict.input_values.to("cpu")).logits
 
15
  audio_data, sample_rate = librosa.load(audio_input, sr=None)
16
 
17
  # Prepare the input dictionary
18
+ input_dict = asr_processor(audio_data, sampling_rate=sample_rate, return_tensors="pt", padding=True)
19
 
20
  # Use the ASR model to get the logits
21
  logits = asr_model(input_dict.input_values.to("cpu")).logits