Update app.py
Browse files
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
|