Class: Mfcc

Mfcc

Compute the Mfcc of the incomming signal. Is basically a wrapper around Fft, Mel and Dct.

support standalone usage

Constructor

new Mfcc(options)

Parameters:
Name Type Description
options Object

Override default parameters.

Properties
Name Type Attributes Default Description
nbrBands nbrBands <optional>
24

Number of Mel bands.

nbrCoefs nbrCoefs <optional>
12

Number of output coefs.

Source:
See:
Example
import lfo from 'waves-lfo/node'

const audioInFile = new lfo.source.AudioInFile({
  filename: 'path/to/file',
  frameSize: 512,
});

const slicer = new lfo.operator.Slicer({
  frameSize: 256,
});

const mfcc = new lfo.operator.Mfcc({
  nbrBands: 24,
  nbrCoefs: 12,
});

const logger = new lfo.sink.Logger({ data: true });

audioInFile.connect(slicer);
slicer.connect(mfcc);
mfcc.connect(logger);

audioInFile.start();

Methods

inputSignal(data) → {Array}

Use the Mfcc operator in standalone mode (i.e. outside of a graph).

Parameters:
Name Type Description
data Array

Signal chunk to analyse.

Source:
Returns:
  • Mfcc coefficients.
Type
Array
Example
const mfcc = new lfo.operator.Mfcc();
// mandatory for use in standalone mode
mfcc.initStream({ frameSize: 256, frameType: 'vector' });
mfcc.inputSignal(signal);