|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.sphinx.frontend.BaseDataProcessor
edu.cmu.sphinx.frontend.filter.Preemphasizer
Implements a high-pass filter that compensates for attenuation in the audio
data. Speech signals have an attenuation (a decrease in intensity of a
signal) of 20 dB/dec. It increases the relative magnitude of the higher
frequencies with respect to the lower frequencies.
The Preemphasizer takes a Data
object that usually represents audio
data as input, and outputs the same Data
object, but with
preemphasis applied. For each value X[i] in the input Data object X, the
following formula is applied to obtain the output Data object Y:
Y[i] = X[i] - (X[i-1] * preemphasisFactor)
where 'i' denotes time.
The preemphasis factor has a value defined by the field PROP_PREEMPHASIS_FACTOR
, with default defined by PROP_PREEMPHASIS_FACTOR_DEFAULT
. A common value for this factor is
something around 0.97.
Other Data
objects are passed along unchanged through this
Preemphasizer.
The Preemphasizer emphasizes the high frequency components, because they usually contain much less energy than lower frequency components, even though they are still important for speech recognition. It is a high-pass filter because it allows the high frequency components to "pass through", while weakening or filtering out the low frequency components.
Field Summary | |
static java.lang.String |
PROP_PREEMPHASIS_FACTOR
The name of the SphinxProperty for preemphasis factor/alpha. |
static double |
PROP_PREEMPHASIS_FACTOR_DEFAULT
The default value of PROP_PREEMPHASIS_FACTOR. |
Constructor Summary | |
Preemphasizer()
|
Method Summary | |
Data |
getData()
Returns the next Data object being processed by this Preemphasizer, or if it is a Signal, it is returned without modification. |
void |
newProperties(PropertySheet ps)
This method is called when this configurable component has new data. |
void |
register(java.lang.String name,
Registry registry)
Register my properties. |
Methods inherited from class edu.cmu.sphinx.frontend.BaseDataProcessor |
getName, getPredecessor, getTimer, initialize, setPredecessor, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String PROP_PREEMPHASIS_FACTOR
public static final double PROP_PREEMPHASIS_FACTOR_DEFAULT
Constructor Detail |
public Preemphasizer()
Method Detail |
public void register(java.lang.String name, Registry registry) throws PropertyException
Configurable
register
in interface Configurable
register
in class BaseDataProcessor
PropertyException
public void newProperties(PropertySheet ps) throws PropertyException
Configurable
newProperties
in interface Configurable
newProperties
in class BaseDataProcessor
PropertyException
public Data getData() throws DataProcessingException
getData
in interface DataProcessor
getData
in class BaseDataProcessor
DataProcessingException
- if there is a processing errorData
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |