mindspore.dataset.audio.SlidingWindowCmn

class mindspore.dataset.audio.SlidingWindowCmn(cmn_window=600, min_cmn_window=100, center=False, norm_vars=False)[source]

Apply sliding-window cepstral mean (and optionally variance) normalization per utterance.

Parameters
  • cmn_window (int, optional) – Window in frames for running average CMN computation (default=600).

  • min_cmn_window (int, optional) – Minimum CMN window used at start of decoding (adds latency only at start). Only applicable if center is False, ignored if center is True (default=100).

  • center (bool, optional) – If True, use a window centered on the current frame. If False, window is to the left. (default=False).

  • norm_vars (bool, optional) – If True, normalize variance to one. (default=False).

Examples

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