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: - x : array
A input signal
- order : int, optional
Order of MFCC. Default is 14.
- fs : int, optional
Sampling frequency. Default is 160000.
- alpha : float, optional
Pre-emphasis coefficient. Default is 0.97.
- eps : float, optional
Flooring value for calculating
log(x)
in filterbank analysis. Default is 1.0.- window_len : int, optional
Window lenght. Default is
len(x)
.- frame_len : int, optional
Frame length. Default is
len(x)
.- num_filterbanks : int, optional
Number of mel-filter banks. Default is 20.
- cepslift : int, optional
Liftering coefficient. Default is 22.
- use_dft : bool, optional
Use DFT (not FFT) or not. Default is False.
- use_hamming : bool, optional
Use hamming window or not. Default is False.
- czero : bool, optional
If True,
mfcc
returns 0-th coefficient as well. Default is False.- power : bool, optional
If True,
mfcc
returns power coefficient as well. Default is False.
Returns: - cc : array
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
ifczero
orpower
is set to True.order + 2
if bothczero
andpower
is set to True.
Raises: - ValueError
if
num_filterbanks
is less than or equal toorder