Baghdad99 commited on
Commit
25ac55d
1 Parent(s): de1b6c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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=None)
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)