def test_auresize(backend, size, channel_first, audio): _change_backend(backend) if channel_first: audio = audio.transpose((1, 0)) resized_audio = audio_utils.auresize( audio, size, channel_first=channel_first) assert resized_audio.shape == size
def load_audio_pydub(path, shape=None, normalize=False): if shape: return auresize(auread(path), shape) return auread(path)