mindspore.dataset.audio.MuLawEncoding
- class mindspore.dataset.audio.MuLawEncoding(quantization_channels=256)[源代码]
基于mu-law压缩的信号编码。
- 参数:
quantization_channels (int, 可选) - 通道数,必须为正数。默认值:256。
样例:
>>> import numpy as np >>> >>> waveform = np.random.random([1, 3, 4]) >>> numpy_slices_dataset = ds.NumpySlicesDataset(data=waveform, column_names=["audio"]) >>> transforms = [audio.MuLawEncoding()] >>> numpy_slices_dataset = numpy_slices_dataset.map(operations=transforms, input_columns=["audio"])