|
|||||||||
| 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
public class 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 aDataobject that usually represents audio data as input, and outputs the same Dataobject, 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 Dataobjects 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 needs to be reconfigured. |
| 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 |
|---|
@S4Double(defaultValue=0.97) 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 newProperties(PropertySheet ps)
throws PropertyException
Configurable
newProperties in interface ConfigurablenewProperties in class BaseDataProcessorps - a property sheet holding the new data
PropertyException - if there is a problem with the properties.
public Data getData()
throws DataProcessingException
getData in interface DataProcessorgetData in class BaseDataProcessorDataProcessingException - if there is a processing errorData
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||