def __init__(self, path=None, sample_rate=16000, noise_levels=(0, 0.5)):
    '\n        Adds noise to an input signal with specific SNR. Higher the noise level, the more noise added.\n        Modified code from https://github.com/willfrey/audio/blob/master/torchaudio/transforms.py\n        '
    if ((path is not None) and (not os.path.exists(path))):
        print("Directory doesn't exist: {}".format(path))
        raise IOError
    self.paths = ((path is not None) and librosa.util.find_files(path))
    self.sample_rate = sample_rate
    self.noise_levels = noise_levels
Adds noise to an input signal with specific SNR. Higher the noise level, the more noise added.
Modified code from https://github.com/willfrey/audio/blob/master/torchaudio/transforms.py
def __init__(self, path=None, sample_rate=16000, noise_levels=(0, 0.5)):
    '\n        Adds noise to an input signal with specific SNR. Higher the noise level, the more noise added.\n        Modified code from https://github.com/willfrey/audio/blob/master/torchaudio/transforms.py\n        '
    if ((path is not None) and (not os.path.exists(path))):
        print("Directory doesn't exist: {}".format(path))
        raise IOError
    self.paths = ((path is not None) and librosa.util.find_files(path))
    self.sample_rate = sample_rate
    self.noise_levels = noise_levels