Spaces:
Running
on
Zero
Running
on
Zero
roychao19477
commited on
Commit
·
658a305
1
Parent(s):
718c79c
Fix spectrogram issue
Browse files
app.py
CHANGED
@@ -60,8 +60,8 @@ def enhance(filepath, model_name):
|
|
60 |
model.eval()
|
61 |
with torch.no_grad():
|
62 |
# load & resample
|
63 |
-
|
64 |
-
|
65 |
if orig_sr != 16000:
|
66 |
wav = librosa.resample(wav, orig_sr=orig_sr, target_sr=16000)
|
67 |
x = torch.from_numpy(wav).float().to(device)
|
|
|
60 |
model.eval()
|
61 |
with torch.no_grad():
|
62 |
# load & resample
|
63 |
+
wav, orig_sr = librosa.load(filepath, sr=None)
|
64 |
+
noisy_wav = wav.copy()
|
65 |
if orig_sr != 16000:
|
66 |
wav = librosa.resample(wav, orig_sr=orig_sr, target_sr=16000)
|
67 |
x = torch.from_numpy(wav).float().to(device)
|