bin
Class Mfcc

java.lang.Object
  extended by bin.Mfcc
All Implemented Interfaces:
FrameSource

public class Mfcc
extends java.lang.Object
implements FrameSource

Feature extraction for ASR and Speaker ID. If you change anything, please increase FEX_VERSION and update LAST_AUTHOR. Feel free to modify CONTRIBUTORS. If you change defaults, do so using the class variables DEFAULT_*

Author:
sikoried

Field Summary
static java.lang.String DEFAULT_AUDIO_FORMAT
          16kHz, 16bit, signed, little endian, linear
static java.lang.String DEFAULT_DELTAS
          Deltas to compute (null = none)
static java.lang.String DEFAULT_MELFILTER
          Filter bank 188Hz-6071Hz, 226.79982mel band width, 50% filter overlap
static java.lang.String DEFAULT_SELECTION
          Static features to select after DCT
static java.lang.String DEFAULT_WINDOW
          Hamming window of 16ms, 10ms shift
 
Constructor Summary
Mfcc(java.lang.String inFile, java.lang.String pAudio, java.lang.String pWindow, java.lang.String pFilterbank, boolean onlySpectrum, boolean doShortTimeEnergy, java.lang.String pSelection, java.lang.String meanFile, java.lang.String pDeltas)
          Initialize the new MFCC object using the given parameter strings.
 
Method Summary
 java.lang.String describePipeline()
           
 int getFrameSize()
          Return the length of the frames (needed for the read call)
static void main(java.lang.String[] args)
           
 boolean read(double[] buf)
          Extract the next frame from the the source stream using a window function
 void tearDown()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface framed.FrameSource
toString
 

Field Detail

DEFAULT_AUDIO_FORMAT

public static java.lang.String DEFAULT_AUDIO_FORMAT
16kHz, 16bit, signed, little endian, linear


DEFAULT_DELTAS

public static java.lang.String DEFAULT_DELTAS
Deltas to compute (null = none)


DEFAULT_MELFILTER

public static java.lang.String DEFAULT_MELFILTER
Filter bank 188Hz-6071Hz, 226.79982mel band width, 50% filter overlap


DEFAULT_SELECTION

public static java.lang.String DEFAULT_SELECTION
Static features to select after DCT


DEFAULT_WINDOW

public static java.lang.String DEFAULT_WINDOW
Hamming window of 16ms, 10ms shift

Constructor Detail

Mfcc

public Mfcc(java.lang.String inFile,
            java.lang.String pAudio,
            java.lang.String pWindow,
            java.lang.String pFilterbank,
            boolean onlySpectrum,
            boolean doShortTimeEnergy,
            java.lang.String pSelection,
            java.lang.String meanFile,
            java.lang.String pDeltas)
     throws java.lang.Exception
Initialize the new MFCC object using the given parameter strings. If a parameter String is null, the default constructor is called, or nthe object is not integrated in the pipe line (deltas, CMS)

Parameters:
inFile - file name to open
pAudio -
pWindow -
pFilterbank -
onlySpectrum -
pSelection -
meanFile -
pDeltas -
Throws:
java.lang.Exception
Method Detail

describePipeline

public java.lang.String describePipeline()

getFrameSize

public int getFrameSize()
Description copied from interface: FrameSource
Return the length of the frames (needed for the read call)

Specified by:
getFrameSize in interface FrameSource

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

read

public boolean read(double[] buf)
             throws java.io.IOException
Description copied from interface: FrameSource
Extract the next frame from the the source stream using a window function

Specified by:
read in interface FrameSource
Parameters:
buf - buffer to save the frame; implementing objects may depend on a constant dimensionduring subsequent calls
Returns:
true on success, false if the stream terminated before the window was filled
Throws:
java.io.IOException

tearDown

public void tearDown()
              throws java.io.IOException
Throws:
java.io.IOException