4th
Browse files- preprocess.py +1 -6
preprocess.py
CHANGED
|
@@ -12,7 +12,7 @@ import random
|
|
| 12 |
|
| 13 |
import noisereduce as nr
|
| 14 |
import librosa
|
| 15 |
-
|
| 16 |
|
| 17 |
import scipy
|
| 18 |
|
|
@@ -69,11 +69,6 @@ class NoiseRemover:
|
|
| 69 |
self._denoised_signal = torch.tensor(denoised).unsqueeze(0)
|
| 70 |
return self._denoised_signal,sr
|
| 71 |
|
| 72 |
-
def comparision(self):
|
| 73 |
-
return ipd.Audio(self._signal, rate = self._sr),ipd.Audio(self._denoised_signal, rate = self._sr)
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
import torch.nn.functional as F
|
| 77 |
|
| 78 |
class TruncateOrPad:
|
| 79 |
"""Dynamically truncates or pads depending on the signal"""
|
|
|
|
| 12 |
|
| 13 |
import noisereduce as nr
|
| 14 |
import librosa
|
| 15 |
+
|
| 16 |
|
| 17 |
import scipy
|
| 18 |
|
|
|
|
| 69 |
self._denoised_signal = torch.tensor(denoised).unsqueeze(0)
|
| 70 |
return self._denoised_signal,sr
|
| 71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
class TruncateOrPad:
|
| 74 |
"""Dynamically truncates or pads depending on the signal"""
|