mindspore.dataset.audio.create_dct

mindspore.dataset.audio.create_dct(n_mfcc, n_mels, norm=NormMode.NONE)[source]

Create a DCT transformation matrix with shape (n_mels, n_mfcc), normalized depending on norm.

Parameters
  • n_mfcc (int) – Number of mfc coefficients to retain, the value must be greater than 0.

  • n_mels (int) – Number of mel filterbanks, the value must be greater than 0.

  • norm (NormMode, optional) – Normalization mode, can be NormMode.NONE or NormMode.ORTHO. Default: NormMode.NONE.

Returns

numpy.ndarray, the transformation matrix, to be right-multiplied to row-wise data of size (n_mels, n_mfcc).

Examples

>>> from mindspore.dataset.audio import create_dct, NormMode
>>>
>>> dct = create_dct(100, 200, NormMode.NONE)