public class PLPFilter extends java.lang.Object
PLPFrequencyFilterBankclass. The filter is defined by a function in the
Constructor. A set of equally spaced frequencies in a linear scale is passed to the constructor, which returns the weights for each of the frequency bins, such that the filter has the shape defined by this piecewise function in the bark scale.
|Modifier and Type||Field and Description|
The center frequency of the filter in Bark.
The center frequency of the filter in Hertz.
|Constructor and Description|
Constructs a PLP filter around a given center frequency.
|Modifier and Type||Method and Description|
Compute the PLP spectrum at the center frequency of this filter for a given power spectrum.
public final double centerFreqInHz
public final double centerFreqInBark
public PLPFilter(double DFTFrequenciesInHz, double centerFreqInHz) throws java.lang.IllegalArgumentException
Defines a filter according to the following equation, defined piecewise (all frequencies in the equation are Bark frequencies):
Filter(f) = 0 if f < -2.5The current implementation assumes that the calling routine passes in an array of frequencies, one for each of the DFT points in the spectrum of the frame of speech to be filtered. This is used in conjunction with a specified center frequency to determine the filter.
= 10^(-(f+0.5)) if -2.5 <= f <= -0.5
= 1 if -0.5 <= f <= 0.5
= 10^(2.5(f-0.5)) if 0.5 <= f <= 1.3
= 0 if f > 1.3
DFTFrequenciesInHz- is a double array containing the frequencies in Hertz corresponding to each of the DFT points in the spectrum of the signal to be filtered.
centerFreqInHz- is the filter's center frequency
java.lang.IllegalArgumentException- if center frequency is wrong
public double filterOutput(double spectrum) throws java.lang.IllegalArgumentException
spectrum- the input power spectrum to be filtered
java.lang.IllegalArgumentException- if the input spectrum is of a different length than the array of filter coefficients