mfcc

fun mfcc(    signal: FloatArray,     sampleRate: Int = 16000,     winLen: Float = 0.025f,     winStep: Float = 0.01f,     numCep: Int = 13,     nFilt: Int = 26,     nfft: Int? = 512,     lowFreq: Int = 0,     highFreq: Int? = null,     preemph: Float = 0.97f,     ceplifter: Int = 22,     appendEnergy: Boolean = true,     winFunc: FloatArray? = null): Array<FloatArray>

Compute MFCC features from an audio signal.

Return

An array of size (NUMFRAMES by numcep) containing features. Each row holds 1 feature vector.

Parameters

signal

the audio signal from which to compute features. Should be an N*1 array

sampleRate

the samplerate of the signal we are working with.

winLen

the length of the analysis window in seconds. Default is 0.025s (25 milliseconds)

winStep

the step between successive windows in seconds. Default is 0.01s (10 milliseconds)

numCep

the number of cepstrum to return, default 13

nFilt

the number of filters in the filterbank, default 26.

nfft

the FFT size. Default is 512.

lowFreq

lowest band edge of mel filters. In Hz, default is 0.

highFreq

highest band edge of mel filters. In Hz, default is samplerate/2

preemph

apply preemphasis filter with preemph as coefficient. 0 is no filter. Default is 0.97.

ceplifter

apply a lifter to final cepstral coefficients. 0 is no lifter. Default is 22.

appendEnergy

if this is true, the zeroth cepstral coefficient is replaced with the log of the total frame energy.

winFunc

the analysis window to apply to each frame. By default no window is applied.