def test_resample(audio, sampling_rate): speed = Resample(source_sampling_rate=16000, target_sampling_rate=sampling_rate) perturbed = speed(audio, SAMPLING_RATE) assert perturbed.shape == (1, sampling_rate)
def test_resample(audio, sampling_rate): resample = Resample(source_sampling_rate=16000, target_sampling_rate=sampling_rate) resampled = resample(audio, SAMPLING_RATE) assert resampled.shape == (1, sampling_rate)