Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def load_data(input_file):
|
|
27 |
speech = speech[:,0] + speech[:,1]
|
28 |
#Resampling at 16KHz since wav2vec2-base-960h is pretrained and fine-tuned on speech audio sampled at 16 KHz.
|
29 |
if sample_rate !=16000:
|
30 |
-
speech = librosa.resample(speech, sample_rate=16000)
|
31 |
return speech
|
32 |
|
33 |
|
|
|
27 |
speech = speech[:,0] + speech[:,1]
|
28 |
#Resampling at 16KHz since wav2vec2-base-960h is pretrained and fine-tuned on speech audio sampled at 16 KHz.
|
29 |
if sample_rate !=16000:
|
30 |
+
speech = librosa.resample(speech, orig_sr=sample_rate, target_sr=16000)
|
31 |
return speech
|
32 |
|
33 |
|