public class LiveCMN extends BaseDataProcessor
BatchCMN
, it does not read in the entire stream of Data
objects before it calculates the mean. It estimates the mean from already
seen data and subtracts the mean from the Data objects on the fly. Therefore,
there is no delay introduced by LiveCMN in general. The only real issue is an
initial CMN estimation, for that some amount of frames are read initially
and cmn estimation is calculated from them.
The properties that affect this processor are defined by the fields
PROP_INITIAL_CMN_WINDOW
, PROP_CMN_WINDOW
, and
PROP_CMN_SHIFT_WINDOW
. Please follow the link
"Constant Field Values" below to see the actual name of the Sphinx
properties.
The mean of all the input cepstrum so far is not reestimated for each
cepstrum. This mean is recalculated after every
PROP_CMN_SHIFT_WINDOW
cepstra. This mean is estimated by dividing
the sum of all input cepstrum so far. After obtaining the mean, the sum is
exponentially decayed by multiplying it by the ratio:
cmnWindow/(cmnWindow + number of frames since the last recalculation)
BatchCMN
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_CMN_SHIFT_WINDOW
The property for the CMN shifting window.
|
static java.lang.String |
PROP_CMN_WINDOW
The property for the live CMN window size.
|
static java.lang.String |
PROP_INITIAL_CMN_WINDOW
The property for the live CMN initial window size.
|
logger
Constructor and Description |
---|
LiveCMN() |
LiveCMN(double initialMean,
int cmnWindow,
int cmnShiftWindow,
int initialCmnWindow) |
Modifier and Type | Method and Description |
---|---|
Data |
getData()
Returns the next Data object, which is a normalized Data produced by this
class.
|
void |
initialize()
Initializes this LiveCMN.
|
void |
newProperties(PropertySheet ps)
This method is called when this configurable component needs to be reconfigured.
|
getPredecessor, setPredecessor
getName, initLogger, toString
@S4Integer(defaultValue=200) public static final java.lang.String PROP_INITIAL_CMN_WINDOW
@S4Integer(defaultValue=300) public static final java.lang.String PROP_CMN_WINDOW
@S4Integer(defaultValue=400) public static final java.lang.String PROP_CMN_SHIFT_WINDOW
public LiveCMN(double initialMean, int cmnWindow, int cmnShiftWindow, int initialCmnWindow)
public LiveCMN()
public void newProperties(PropertySheet ps) throws PropertyException
Configurable
newProperties
in interface Configurable
newProperties
in class ConfigurableAdapter
ps
- a property sheet holding the new dataPropertyException
- if there is a problem with the properties.public void initialize()
initialize
in interface DataProcessor
initialize
in class BaseDataProcessor
public Data getData() throws DataProcessingException
getData
in interface DataProcessor
getData
in class BaseDataProcessor
DataProcessingException
- if there is a data processing error