Linear Predictive Coding

Simulation
Introduced by
Freddy Burg, John Makhoul
Year
1975
Type
Predictive speech coding and analysis
Family
Signal processing, Speech modeling

What does it do?

Linear Predictive Coding (LPC) models a speech signal by assuming that each sample can be estimated as a linear combination of a small number of preceding samples.

The resulting coefficients describe the vocal tract as an all-pole filter, and the prediction residual carries the excitation. LPC is the basis of many speech codecs and is also used in speech synthesis and speaker analysis.

The intuition behind the method

Voiced speech is quasi-periodic: the vocal cords produce a roughly regular excitation, and the vocal tract filters it into the spectral shapes that distinguish phonemes. LPC exploits the short-term correlation this produces by predicting each sample from the few samples before it, using a small number of coefficients (typical prediction orders range from 8 to 16). If the prediction is good, the remaining error signal (the residual) is small and carries most of the excitation information, so a codec can send the coefficients and an excitation description instead of the waveform. The model is linear and all-pole, which is a simplification of the real vocal tract, and it is most accurate for steady, voiced sounds.

History

The all-pole, least-squares formulation of LPC is set out in Makhoul's 1975 tutorial review in Proceedings of the IEEE, which also discusses its use in data compression, including the quantization and encoding of reflection coefficients for transmission. Later developments include CELP (Code-Excited Linear Prediction), which replaces the simple pitch excitation with vector-quantized codebook entries, and cellular and internet codecs that retain LPC principles with extensions.

When to use it

Choose LPC for speech-only tasks: low-bit-rate speech coding, speech synthesis, and speech analysis that needs a parametric description of the vocal tract, such as formant estimation or speaker features. It works best on clean, voiced speech recorded at a stable level. Do not choose plain LPC for music or general audio, where the all-pole model and speech-oriented excitation are poor fits. Noisy recordings are also a poor match, because coefficient and pitch estimates degrade under additive noise. For general audio at any bit rate, dedicated audio codecs such as MP3 and AAC are the usual choice.

Limitations and considerations

  • Designed for speech: music and general audio have harmonic structure and spectral shapes that the all-pole speech model does not capture well, so they need higher model orders or different methods.
  • Assumes a linear, approximately stationary source-filter model over each frame; transient sounds such as plosives and fricatives are modelled less accurately than steady vowels.
  • Pitch is not part of the LPC filter and must be estimated separately; pitch estimation is harder for some speakers (for example, female speakers and whispered speech) and in noise, and pitch errors carry into synthesized speech.
  • Because the residual is the part of the signal the filter does not explain, coarse quantization of the residual at low bit rates reduces naturalness, and in some codecs also intelligibility.
  • Basic LPC does not represent speaker-specific characteristics such as accent or voice quality; speaker normalization requires additional processing, and estimated coefficients degrade when the recording contains additive noise.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Separates excitation from filter: the coefficients describe an all-pole vocal-tract-like filter, while pitch and gain describe the excitation, so the two can be changed independently for pitch shifting, time stretching or voice conversion.
  • Compact parametric description: each frame is reduced to a small set of coefficients plus gain and pitch, rather than many waveform samples, which is why LPC suits low-bit-rate speech coding.
  • Computationally modest: the normal equations for an all-pole model can be solved recursively (Durbin-type recursion), keeping the analysis cost low enough for real-time use on embedded hardware.
  • Interpretable spectral envelope: the poles of the LPC filter correspond to spectral peaks, so the frequency response of the fitted filter can be read as a formant-like envelope.
  • Suitable for transmission: Makhoul's review discusses quantization and encoding of the reflection (partial correlation) coefficients, which is the basis for transmitting LPC parameters efficiently.

Applications

  • Speech coding and telephony: LPC-based techniques, and CELP-family extensions, are used in cellular and internet telephony codecs.
  • Speaker recognition and verification: cepstral features derived from the LPC spectrum are one option among several for speaker identification and verification systems.
  • Voice conversion and speech synthesis: separating the filter from the excitation allows voice characteristics to be modified and synthetic speech to be generated.
  • Speech enhancement: the all-pole model can provide a parametric speech envelope for use within enhancement methods; the benefit depends on the method and the noise conditions and should be validated on the target recordings.
  • Forensic audio analysis: LPC-derived spectral features can describe a speaker's vocal tract in recordings. Additive noise degrades these estimates, so results should be validated on the case material before any forensic use.

How it works

How it works

1

Record or digitize a speech signal at 8–16 kHz (speech bandwidth); frame the signal into overlapping windows (typically 20 ms, 50% overlap). Frame length is a stationarity trade-off: frames must be short enough for the vocal tract to be roughly stationary within them, yet long enough to give stable coefficient estimates.

2

Apply a pre-emphasis (high-pass) filter to reduce the dominance of low-frequency energy in the spectrum, then apply a Hamming window to each frame to reduce edge effects at frame boundaries.

3

Estimate the autocorrelation of the windowed frame and solve the normal equations R a = r for the LPC coefficients a, where R is the Toeplitz autocorrelation matrix and r is the autocorrelation vector. The Yule-Walker equations, the Durbin recursion and lattice formulations are standard ways of solving them. With the autocorrelation method on windowed data, the fitted all-pole filter is guaranteed to be stable. Makhoul's review treats this as a least-squares problem in the time domain.

4

Represent each frame by its LPC coefficients (typically 10–12 values), a gain and a fundamental frequency (pitch). Speech is synthesized by driving the all-pole filter with white noise (unvoiced sounds) or a pitch-period impulse train (voiced sounds).

5

LPC coefficients describe the spectral envelope. The poles of the fitted all-pole filter correspond to spectral peaks and are read as approximate formant (vocal tract resonance) positions. The envelope is obtained by evaluating the frequency response of the LPC filter, and it follows spectral peaks more closely than spectral valleys. Pitch describes the excitation rate and gain describes loudness. These features are then used for coding, synthesis or speaker analysis.

Common pitfalls

  • Using an insufficient LPC order (below 8): low-order models fail to capture the formants, which produces muffled, synthetic-sounding speech.
  • Over-aggressive residual quantization: the LPC coefficients may be accurate, but a coarsely quantized residual degrades quality.
  • Skipping pre-emphasis: without high-pass filtering, low-frequency energy dominates the fit, so the all-pole model spends its poles on the wrong part of the spectrum.
  • Assuming a constant frame rate: voice activity detection and frame dropping during silence can improve codec efficiency, but they need careful implementation to avoid clipping speech onsets.
  • Relying on objective measures alone: codec tuning depends on listener judgements, so subjective measures such as MOS (Mean Opinion Score) and listening tests are needed alongside any computed error.
  • Skipping fit checks: with the autocorrelation method, confirm that all poles lie inside the unit circle, compare the LPC envelope against the short-time spectrum, and select the order using prediction-error criteria or listening tests.

Frequently asked questions

What is the optimal LPC order for speech?

No single optimal order exists. Common practice for 8 kHz speech is around 10 to 12 poles, and wideband (16 kHz) speech typically uses higher orders. The order can be selected with criteria based on the normalized minimum prediction error, which Makhoul (1975) discusses as a way to determine an optimal number of poles. A higher order captures more detail but requires more coefficients and risks overfitting, so listening tests are often used to confirm the choice.

How do I extract speaker identity from LPC coefficients?

Cepstral analysis of the LPC model (for example, the inverse FFT of the log LPC spectrum) yields features that describe formant positions and fine spectral structure. Cepstral features derived this way are one common option for speaker recognition systems; whether they outperform raw LPC coefficients should be checked on the target data.

Why is pitch estimation hard in LPC?

LPC models the vocal tract filter; pitch is determined by excitation (vibration rate), not the filter. Pitch estimation requires separate autocorrelation analysis or harmonic analysis of the residual signal. Noisy or weak pitch signals (female speakers, whisper) are particularly challenging; errors in pitch estimation directly degrade synthesis quality.

Can LPC compress music and general audio?

LPC is designed for speech and performs poorly on music, which has rich harmonic content and complex spectral structure. Raising the LPC order can capture some additional spectral detail, but the all-pole speech model is not matched to music, and dedicated audio codecs such as MP3 and AAC are designed for that material. LPC remains the standard choice for speech-only applications.

How is LPC related to CELP codecs?

CELP (Code-Excited Linear Prediction) builds on LPC by replacing a simple pitch excitation with a vector-quantized code from a codebook. This is used to improve quality at low bit rates (< 8 kbps). CELP-family codecs are used in many modern cellular speech standards; it is essentially LPC plus a more detailed excitation model.

Related methods

Sources

  1. Makhoul, J. (1975). Linear prediction: A tutorial review. Proceedings of the IEEE, 63(4), 561–580.

    Open DOI reference
  2. Rabiner, L. R., & Schafer, R. W. (1978). Digital Processing of Speech Signals. Prentice-Hall.

    ISBN: 978-0132136029
  3. Haykin, S. (2002). Adaptive Filter Theory (4th ed.). Prentice Hall.

    ISBN: 978-0130901262