Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
5d480ab
1
Parent(s):
a8e4601
Update app
Browse files
app.py
CHANGED
@@ -784,7 +784,7 @@ def load_spectrograms(wav_file, asd=False, num_frames=None, window_frames=25, st
|
|
784 |
|
785 |
# Convert to tensor
|
786 |
wav = torch.FloatTensor(wav).unsqueeze(0)
|
787 |
-
mel, _, _, _ = wav2filterbanks(wav
|
788 |
spec = mel.squeeze(0).cpu().numpy()
|
789 |
orig_spec = spec
|
790 |
spec = np.array([spec[i:i+(window_frames*stride), :] for i in range(0, spec.shape[0], stride) if (i+(window_frames*stride) <= spec.shape[0])])
|
|
|
784 |
|
785 |
# Convert to tensor
|
786 |
wav = torch.FloatTensor(wav).unsqueeze(0)
|
787 |
+
mel, _, _, _ = wav2filterbanks(wav)
|
788 |
spec = mel.squeeze(0).cpu().numpy()
|
789 |
orig_spec = spec
|
790 |
spec = np.array([spec[i:i+(window_frames*stride), :] for i in range(0, spec.shape[0], stride) if (i+(window_frames*stride) <= spec.shape[0])])
|