mindspore.dataset.audio.RiaaBiquad

View Source On Gitee
class mindspore.dataset.audio.RiaaBiquad(sample_rate)[source]

Apply RIAA vinyl playback equalization.

Similar to SoX implementation.

Parameters

sample_rate (int) – sampling rate of the waveform, e.g. 44100 (Hz), can only be one of 44100, 48000, 88200, 96000.

Raises
  • TypeError – If sample_rate is not of type int.

  • ValueError – If sample_rate is not any of [44100, 48000, 88200, 96000].

Supported Platforms:

CPU

Examples

>>> import numpy as np
>>> import mindspore.dataset as ds
>>> import mindspore.dataset.audio as audio
>>>
>>> waveform = np.array([[1, 2, 3], [4, 5, 6]], dtype=np.float64)
>>> numpy_slices_dataset = ds.NumpySlicesDataset(data=waveform, column_names=["audio"])
>>> transforms = [audio.RiaaBiquad(44100)]
>>> numpy_slices_dataset = numpy_slices_dataset.map(operations=transforms, input_columns=["audio"])
Tutorial Examples: