public class Preemphasizer extends BaseDataProcessor
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
of 0.97. 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.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_PREEMPHASIS_FACTOR
The property for preemphasis factor/alpha.
|
logger
Constructor and Description |
---|
Preemphasizer() |
Preemphasizer(double preemphasisFactor) |
Modifier and Type | Method and Description |
---|---|
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.
|
getPredecessor, initialize, setPredecessor
getName, initLogger, toString
@S4Double(defaultValue=0.97) public static final java.lang.String PROP_PREEMPHASIS_FACTOR
public Preemphasizer(double preemphasisFactor)
public Preemphasizer()
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 Data getData() throws DataProcessingException
getData
in interface DataProcessor
getData
in class BaseDataProcessor
DataProcessingException
- if there is a processing errorData