def test_Vol(self): test_filepath = common_utils.get_asset_path( 'steam-train-whistle-daniel_simon.wav') waveform, _ = torchaudio.load(test_filepath) self._assert_consistency(T.Vol(1.1), waveform)
def test_Vol(self): test_filepath = os.path.join(common_utils.TEST_DIR_PATH, 'assets', 'steam-train-whistle-daniel_simon.wav') waveform, _ = torchaudio.load(test_filepath) self._assert_consistency(T.Vol(1.1), waveform)
def test_Vol(self): waveform = common_utils.get_whitenoise() self._assert_consistency(T.Vol(1.1), waveform)
def test_vol(self, gain_type, gain): data, path = self.get_whitenoise() result = T.Vol(gain, gain_type)(data) self.assert_sox_effect(result, path, ['vol', f'{gain}', gain_type])
def test_vol(self, gain, gain_type): sample_rate = 8000 transform = T.Vol(gain=gain, gain_type=gain_type) waveform = get_whitenoise(sample_rate=sample_rate, duration=0.05, n_channels=2) self.assert_grad(transform, [waveform])