Spaces:
Runtime error
Runtime error
Hendrik Schroeter
commited on
librosa fallback
Browse files- app.py +3 -2
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -73,11 +73,12 @@ def mix_and_denoise(speech_rec, speech_upl, noise, snr):
|
|
| 73 |
except RuntimeError as e:
|
| 74 |
logger.error("Could not load audio: " + str(e))
|
| 75 |
import os
|
|
|
|
| 76 |
|
| 77 |
print(os.path.getsize(speech_file))
|
| 78 |
print(os.path.getmtime(speech_file))
|
| 79 |
-
|
| 80 |
-
|
| 81 |
|
| 82 |
logger.info(f"Loaded speech with shape {speech.shape}")
|
| 83 |
noise, _ = load_audio(noise, sr)
|
|
|
|
| 73 |
except RuntimeError as e:
|
| 74 |
logger.error("Could not load audio: " + str(e))
|
| 75 |
import os
|
| 76 |
+
import librosa
|
| 77 |
|
| 78 |
print(os.path.getsize(speech_file))
|
| 79 |
print(os.path.getmtime(speech_file))
|
| 80 |
+
meta = object()
|
| 81 |
+
speech, meta.sample_rate = librosa.load(speech_file, sr)
|
| 82 |
|
| 83 |
logger.info(f"Loaded speech with shape {speech.shape}")
|
| 84 |
noise, _ = load_audio(noise, sr)
|
requirements.txt
CHANGED
|
@@ -4,3 +4,4 @@ deepfilternet
|
|
| 4 |
matplotlib
|
| 5 |
markdown
|
| 6 |
gradio
|
|
|
|
|
|
| 4 |
matplotlib
|
| 5 |
markdown
|
| 6 |
gradio
|
| 7 |
+
librosa
|