Functions | |
void | lpc_filter (EST_Wave &sig, EST_FVector &a, EST_Wave &res) |
void | inv_lpc_filter (EST_Wave &sig, EST_FVector &a, EST_Wave &res) |
void | lpc_filter_1 (EST_Track &lpc, EST_Wave &res, EST_Wave &sig) |
void | lpc_filter_fast (EST_Track &lpc, EST_Wave &res, EST_Wave &sig) |
void | inv_lpc_filter_ola (EST_Wave &sig, EST_Track &lpc, EST_Wave &res) |
The linear prediction filters are used for the analysis and synthesis of waveforms according the to linear prediction all-pole model.
The linear prediction states that the value of a signal at a given point is equal to a weighted sum of the previous P values, plus a correction value for that point:
Given a set of coefficients and the original signal, we can use this equation to work out e, the residual. Conversely given the coefficients and the residual signal, an estimation of the original signal can be calculated.
If a single set of coefficients were used for the entire waveform, the filtering process would be simple. It is usual however to have a different set of coefficients for every frame, and there are many possible ways to switch from one coefficient set to another so as not to cause discontinuities at the frame boundaries.
void lpc_filter | ( | EST_Wave & | sig, |
EST_FVector & | a, | ||
EST_Wave & | res | ||
) |
void inv_lpc_filter | ( | EST_Wave & | sig, |
EST_FVector & | a, | ||
EST_Wave & | res | ||
) |
Synthesize a signal from a track of linear prediction coefficients. This function takes a set of LP frames and a residual and produces a synthesized signal.
For each frame, the function picks an end point, which is half-way between the current frame's time position and the next frame's. A start point is defined as being the previous frame's end. Using these two values, a portion of residual is extracted and passed to lpc_filter along with the LP coefficients for that frame. This function writes directly into the signal for the values between start and end;
sig | the waveform to be synthesized |
lpc | a track of time positioned LP coefficients |
res | the input residual waveform |
Synthesize a signal from a track of linear prediction coefficients. This function takes a set of LP frames and a residual and produces a synthesized signal.
This is functionally equivalent to lpc_filter_1 except it reduces the residual by 0.5 before filtering. Importantly it is about three times faster than lpc_filter_1 but in doing so uses direct C buffers rather than the neat C++ access function. This function should be regarded as temporary and will be deleted after we restructure the low level classes to give better access.
sig | the waveform to be synthesized |
lpc | a track of time positioned LP coefficients |
res | the input residual waveform |
Produce a residual from a track of linear prediction coefficients and a signal using an overlap add technique.
For each frame, the function estimates the local pitch period and picks a start point one period before the current time position and an end point one period after it.
A portion of residual corresponding to these times is then produced using inv_lpc_filter. The resultant section of residual is then overlap-added into the main residual wave object.
sig | the speech waveform to be filtered |
lpc | a track of time positioned LP coefficients |
res | the output residual waveform |