Edinburgh Speech Tools  2.1-release
Linear Prediction filters
Collaboration diagram for Linear Prediction filters:

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)
 

Detailed Description

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:

\[s_{n} = \sum_{i=1}^{P} a_{i}.s_{n-i} + e_{n}\]

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.

Function Documentation

void lpc_filter ( EST_Wave sig,
EST_FVector a,
EST_Wave res 
)

Synthesize a signal from a single set of linear prediction coefficients and the residual values.

Parameters
sigthe waveform to be synthesized
aa single set of LP coefficients
resthe input residual waveform

Definition at line 53 of file filter.cc.

void inv_lpc_filter ( EST_Wave sig,
EST_FVector a,
EST_Wave res 
)

Filter the waveform using a single set of coefficients so as to produce a residual signal.

Parameters
sigthe speech waveform to be filtered
aa single set of LP coefficients
resthe output residual waveform

Definition at line 68 of file filter.cc.

void lpc_filter_1 ( EST_Track lpc,
EST_Wave res,
EST_Wave sig 
)

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;

Parameters
sigthe waveform to be synthesized
lpca track of time positioned LP coefficients
resthe input residual waveform

Definition at line 149 of file filter.cc.

void lpc_filter_fast ( EST_Track lpc,
EST_Wave res,
EST_Wave sig 
)

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.

Parameters
sigthe waveform to be synthesized
lpca track of time positioned LP coefficients
resthe input residual waveform

Definition at line 197 of file filter.cc.

void inv_lpc_filter_ola ( EST_Wave sig,
EST_Track lpc,
EST_Wave res 
)

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.

Parameters
sigthe speech waveform to be filtered
lpca track of time positioned LP coefficients
resthe output residual waveform

Definition at line 102 of file filter.cc.