Spaces:
Runtime error
Runtime error
Commit ·
3480b5a
1
Parent(s): c1aba8c
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,7 +13,7 @@ import gradio as gr
|
|
| 13 |
def speech_file_to_array_fn(path, sampling_rate):
|
| 14 |
speech_array, _sampling_rate = torchaudio.load(path)
|
| 15 |
resampler = torchaudio.transforms.Resample(_sampling_rate)
|
| 16 |
-
speech = resampler(speech_array).squeeze().numpy()
|
| 17 |
return speech
|
| 18 |
|
| 19 |
def predict(path, sampling_rate, feature_extractor, device, model, config):
|
|
|
|
| 13 |
def speech_file_to_array_fn(path, sampling_rate):
|
| 14 |
speech_array, _sampling_rate = torchaudio.load(path)
|
| 15 |
resampler = torchaudio.transforms.Resample(_sampling_rate)
|
| 16 |
+
speech = resampler(speech_array[1]).squeeze().numpy()
|
| 17 |
return speech
|
| 18 |
|
| 19 |
def predict(path, sampling_rate, feature_extractor, device, model, config):
|