SpeechFeatures

class SpeechFeatures(fft: FFT = KotlinFFT())

Constructors

Link copied to clipboard
fun SpeechFeatures(fft: FFT = KotlinFFT())

Functions

Link copied to clipboard
fun delta(feat: FloatArray, n: Int): Array<FloatArray>

Compute delta features from a feature vector sequence.

Link copied to clipboard
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.

Link copied to clipboard
fun getFilterBanks(    nFilt: Int = 20,     nfft: Int = 512,     sampleRate: Int = 16000,     lowFreq: Int = 0,     highFreqIn: Int? = null): Array<FloatArray>

Compute a Mel-filterbank. The filters are stored in the rows, the columns correspond to fft bins. The filters are returned as an array of size nfilt * (nfft/2 + 1)

Link copied to clipboard
fun hz2mel(hz: Double): Double
fun hz2mel(hz: DoubleArray): DoubleArray

Convert a value in Hertz to Mels

Link copied to clipboard
fun lifter(cepstra: FloatArray, l: Int = 22): FloatArray

Apply a cepstral lifter the the matrix of cepstra. This has the effect of increasing the magnitude of the high frequency DCT coeffs.

Link copied to clipboard
fun logfbank(    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): Array<FloatArray>

Compute log Mel-filterbank energy features from an audio signal.

Link copied to clipboard
fun mel2hz(mel: Double): Double
fun mel2hz(mel: DoubleArray): DoubleArray

Convert a value in Mels to Hertz

Link copied to clipboard
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.

Link copied to clipboard
fun ssc(    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): Array<FloatArray>

Compute Spectral Subband Centroid features from an audio signal.