mindspore.dataset.audio.transforms.TimeStretch
- class mindspore.dataset.audio.transforms.TimeStretch(hop_length=None, n_freq=201, fixed_rate=None)[source]
Stretch STFT in time at a given rate, without changing the pitch.
- Parameters
Examples
>>> import numpy as np >>> >>> waveform = np.random.random([1, 30]) >>> numpy_slices_dataset = ds.NumpySlicesDataset(data=waveform, column_names=["audio"]) >>> transforms = [audio.TimeStretch()] >>> numpy_slices_dataset = numpy_slices_dataset.map(operations=transforms, input_columns=["audio"])