mindspore.dataset.audio.DCShift
- class mindspore.dataset.audio.DCShift(shift, limiter_gain=None)[源代码]
Apply a DC shift to the audio.
- Parameters
Examples
>>> import numpy as np >>> >>> waveform = np.array([0.60, 0.97, -1.04, -1.26, 0.97, 0.91, 0.48, 0.93]) >>> numpy_slices_dataset = ds.NumpySlicesDataset(data=waveform, column_names=["audio"]) >>> transforms = [audio.DCShift(0.5, 0.02)] >>> numpy_slices_dataset = numpy_slices_dataset.map(operations=transforms, input_columns=["audio"])