mindspore.dataset.audio.DCShift
- class mindspore.dataset.audio.DCShift(shift, limiter_gain=None)[source]
Apply a DC shift to the audio. This can be useful to remove DC offset from 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"])