fbank

fun fbank(    signal: FloatArray,     sampleRate: Int = 16000,     winLen: Float = 0.025f,     winStep: Float = 0.01f,     nFilt: Int = 26,     nfft: Int = 512,     lowFreq: Int = 0,     highFreq: Int? = null,     preemph: Float = 0.97f,     winFunc: FloatArray? = null): Pair<Array<FloatArray>, FloatArray>

Compute Mel-filterbank energy features from an audio signal.

Return

2 values. The first is an array of size (NUMFRAMES by nfilt) containing features. Each row holds 1 feature vector. The second return value is the energy in each frame (total energy, unwindowed)

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)

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.

winFunc

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