nvidia.dali.fn.mfcc

nvidia.dali.fn.mfcc(*inputs, **kwargs)

Computes Mel Frequency Cepstral Coefficiencs (MFCC) from a mel spectrogram.

Supported backends
  • ‘cpu’

  • ‘gpu’

Parameters

input (TensorList) – Input to the operator.

Keyword Arguments
  • axis (int, optional, default = 0) –

    Axis over which the transform will be applied.

    If a value is not provided, the outer-most dimension will be used.

  • bytes_per_sample_hint (int or list of int, optional, default = [0]) –

    Output size hint, in bytes per sample.

    If specified, the operator’s outputs residing in GPU or page-locked host memory will be preallocated to accommodate a batch of samples of this size.

  • dct_type (int, optional, default = 2) –

    Discrete Cosine Transform type.

    The supported types are 1, 2, 3, 4. The formulas that are used to calculate the DCT are equivalent to those described in https://en.wikipedia.org/wiki/Discrete_cosine_transform (the numbers correspond to types listed in https://en.wikipedia.org/wiki/Discrete_cosine_transform#Formal_definition).

  • lifter (float, optional, default = 0.0) –

    Cepstral filtering coefficient, which is also known as the liftering coefficient.

    If the lifter coefficient is greater than 0, the MFCCs will be scaled based on the following formula:

    MFFC[i] = MFCC[i] * (1 + sin(pi * (i + 1) / lifter)) * (lifter / 2)
    

  • n_mfcc (int, optional, default = 20) – Number of MFCC coefficients.

  • normalize (bool, optional, default = False) –

    If set to True, the DCT uses an ortho-normal basis.

    Note

    Normalization is not supported when dct_type=1.

  • preserve (bool, optional, default = False) – Prevents the operator from being removed from the graph even if its outputs are not used.

  • seed (int, optional, default = -1) –

    Random seed.

    If not provided, it will be populated based on the global seed of the pipeline.