pysptk.sptk.mfcc

pysptk.sptk.mfcc(x, order=14, fs=16000, alpha=0.97, eps=1.0, window_len=None, frame_len=None, num_filterbanks=20, cepslift=22, use_dft=False, use_hamming=False, czero=False, power=False)[source]

MFCC

Parameters
xarray

A input signal

orderint, optional

Order of MFCC. Default is 14.

fsint, optional

Sampling frequency. Default is 160000.

alphafloat, optional

Pre-emphasis coefficient. Default is 0.97.

epsfloat, optional

Flooring value for calculating log(x) in filterbank analysis. Default is 1.0.

window_lenint, optional

Window lenght. Default is len(x).

frame_lenint, optional

Frame length. Default is len(x).

num_filterbanksint, optional

Number of mel-filter banks. Default is 20.

cepsliftint, optional

Liftering coefficient. Default is 22.

use_dftbool, optional

Use DFT (not FFT) or not. Default is False.

use_hammingbool, optional

Use hamming window or not. Default is False.

czerobool, optional

If True, mfcc returns 0-th coefficient as well. Default is False.

powerbool, optional

If True, mfcc returns power coefficient as well. Default is False.

Returns
ccarray

MFCC vector, which is ordered as:

mfcc[0], mfcc[1], mfcc[2], … mfcc[order-1], c0, Power.

Note that c0 and Power are optional.

Shape of cc is:

  • order by default.

  • orde + 1 if czero or power is set to True.

  • order + 2 if both czero and power is set to True.

Raises
ValueError

if num_filterbanks is less than or equal to order