Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ tts = pipeline("text-to-speech", model="Baghdad99/english_voice_tts")
|
|
12 |
|
13 |
def translate_speech(audio_input):
|
14 |
# Load the audio file as a floating point time series
|
15 |
-
audio_data, sample_rate = librosa.load(audio_input, sr=
|
16 |
|
17 |
# Prepare the input dictionary
|
18 |
input_dict = asr_processor(audio_data, sampling_rate=sample_rate, return_tensors="pt", padding=True)
|
|
|
12 |
|
13 |
def translate_speech(audio_input):
|
14 |
# Load the audio file as a floating point time series
|
15 |
+
audio_data, sample_rate = librosa.load(audio_input, sr=16000)
|
16 |
|
17 |
# Prepare the input dictionary
|
18 |
input_dict = asr_processor(audio_data, sampling_rate=sample_rate, return_tensors="pt", padding=True)
|