Skip to main content

Linear Predictive Coding (LPC) in Speech Processing


Linear Predictive Coding (LPC) in Speech Signal Processing

What is LPC?

Linear Predictive Coding (LPC) is a method that represents a speech signal using a small number of parameters. It models the speech signal as the output of a linear filter excited by a source (voice or noise).

LPC is widely used in speech compression, speech synthesis, coding, and recognition.

1. Core Idea of LPC

LPC assumes that the current speech sample can be approximated by a linear combination of past samples:

x[n] ≈ a₁ x[n−1] + a₂ x[n−2] + ... + aโ‚š x[n−p]

The coefficients a₁, a₂, ..., aโ‚š are chosen to minimize the prediction error.

2. Why This Works for Speech

The human vocal tract behaves like an all-pole acoustic filter. Thus speech can be approximated by the model:

x[n] = − ฮฃ (aโ‚– x[n−k]) + G e[n]

Where:

  • aโ‚– = LPC coefficients (vocal tract shape)
  • e[n] = excitation (voiced/unvoiced source)
  • G = gain

So LPC effectively models the vocal tract filter.

3. Does LPC Predict Future Samples?

Yes. LPC predicts the next speech sample:

x̂[n] = ฮฃ (aโ‚– x[n−k])

However, the goal is not prediction—the prediction process is only used to estimate the vocal tract filter.

Prediction Error

e[n] = x[n] − x̂[n]

Error Minimization

The LPC coefficients minimize the total squared error:

E = ฮฃ e[n]²

4. How LPC Coefficients Are Computed

LPC coefficients are typically computed using:

  • Autocorrelation method
  • Levinson–Durbin recursion (efficient solver)

These coefficients describe the vocal tract filter:

H(z) = G / (1 − ฮฃ aโ‚– z⁻แต)

The poles of this filter correspond to formant frequencies.

5. What LPC Represents

  • Resonance structure of the vocal tract
  • Formant frequencies
  • Spectral envelope of speech

So LPC is primarily a vocal tract model, not a prediction tool.

6. Applications of LPC

  • Speech compression (CELP, GSM, VoIP)
  • Text-to-speech synthesis
  • Speech recognition
  • Pitch and formant analysis
  • Speech coding

 

LPC-Based Speech Compression

LPC Speech Compression

Linear Predictive Coding (LPC) compresses speech by modeling it as a linear filter excited by a source:

x[n] = -ฮฃ (a_k x[n-k]) + G e[n]
  • a_k: LPC coefficients (vocal tract filter)
  • e[n]: excitation (glottal pulses or noise)
  • G: gain

Instead of sending every speech sample, LPC transmits only the parameters, drastically reducing data.

How LPC Compression Works Step by Step

  1. Frame the speech signal: divide into short frames (10–30 ms), assuming stationarity.
  2. Compute LPC coefficients: use autocorrelation + Levinson-Durbin; typical order 10–20.
  3. Compute the excitation signal: voiced frames → periodic pitch; unvoiced → noise.
  4. Quantize coefficients and excitation: convert LPC coefficients, gain, pitch to bits for transmission.
  5. Transmit parameters: only coefficients, gain, pitch, and voiced/unvoiced flag are sent.
  6. Synthesize speech at decoder: use LPC filter with excitation signal to reconstruct waveform.

Example Compression Ratio

  • Original: 8 kHz, 16-bit PCM → 128 kbps
  • LPC: 10 coefficients + gain + pitch → ~2–4 kbps
  • Compression ratio: 30–50×

Why LPC Achieves Compression

  • Speech is highly correlated; samples are predictable.
  • LPC models this correlation with a few coefficients:
x[n] ≈ ฮฃ a_k x[n-k]
  • Only the residual excitation carries new information, reducing bandwidth.

Advanced LPC-Based Coders

  • CELP (Code-Excited Linear Prediction): uses codebook for excitation → bit rates 4.8–16 kbps.
  • G.729, GSM: LPC-based coders used in telephony and mobile.

Summary

  • LPC predicts the current speech sample using previous samples.
  • This prediction is used to estimate the vocal tract filter.
  • LPC coefficients represent filter parameters, not speech samples.
  • The result is an efficient, compact model of speech.
  • LPC compresses speech by sending parameters instead of raw samples.
  • Key parameters: LPC coefficients, gain, excitation.
  • Works because speech is predictable and highly correlated.
  • Drastically reduces bit rate while maintaining intelligibility.

 

Further Reading

  1.  

People are good at skipping over material they already know!

View Related Topics to







Contact Us

Name

Email *

Message *

Popular Posts

Shannon Limit Explained: Negative SNR, Eb/No and Channel Capacity

Understanding Negative SNR and the Shannon Limit Understanding Negative SNR and the Shannon Limit An explanation of Signal-to-Noise Ratio (SNR), its behavior in decibels, and how Shannon's theorem defines the ultimate communication limit. Signal-to-Noise Ratio in Shannon’s Equation In Shannon's equation, the Signal-to-Noise Ratio (SNR) is defined as the signal power divided by the noise power: SNR = S / N Since both signal power and noise power are physical quantities, neither can be negative. Therefore, the SNR itself is always a positive number. However, engineers often express SNR in decibels: SNR(dB) When SNR = 1, the logarithmic value becomes: SNR(dB) = 0 When the noise power exceeds the signal power (SNR < 1), the decibel representation becomes negative. Behavior of Shannon's Capacity Equation Shannon’s channel capacity formula is: C = B log₂(1 + SNR) For SNR = 0: log₂(1 + SNR) = 0 When SNR becomes smaller (in...

Analog vs Digital Modulation Techniques | Advantages of Digital ...

Modulation Techniques Analog vs Digital Modulation Techniques... In the previous article, we've talked about the need for modulation and we've also talked about analog & digital modulations briefly. In this article, we'll discuss the main difference between analog and digital modulation in the case of digital modulation it takes a digital signal for modulation whereas analog modulator takes an analog signal.  Advantages of Digital Modulation over Analog Modulation Digital Modulation Techniques are Bandwidth efficient Its have good resistance against noise It can easily multiple various types of audio, voice signal As it is good noise resistant so we can expect good signal strength So, it leads high signal-to-noise ratio (SNR) Alternatively, it provides a high data rate or throughput Digital Modulation Techniques have better swathing capability as compared to Analog Modulation Techniques  The digital system provides better security than the a...

Amplitude, Frequency, and Phase Modulation Techniques (AM, FM, and PM)

๐Ÿ“˜ Overview ๐Ÿงฎ Amplitude Modulation (AM) ๐Ÿงฎ Online Amplitude Modulation Simulator ๐Ÿงฎ MATLAB Code for AM ๐Ÿงฎ Q & A and Summary ๐Ÿ“š Further Reading Amplitude Modulation (AM): The carrier signal's amplitude varies linearly with the amplitude of the message signal. An AM wave may thus be described, in the most general form, as a function of time as follows .                       When performing amplitude modulation (AM) with a carrier frequency of 100 Hz and a message frequency of 10 Hz, the resulting peak frequencies are as follows: 90 Hz (100 - 10 Hz), 100 Hz, and 110 Hz (100 + 10 Hz). Figure: Frequency Spectrums of AM Signal (Lower Sideband, Carrier, and Upper Sideband) A low-frequency message signal is modulated with a high-frequency carrier wave using a local oscillator to make communication possible. DSB, SSB, and VSB are common amplitude modulation techniques. We find a lot of bandwi...

BER vs SNR for M-ary QAM, M-ary PSK, QPSK, BPSK, ...(MATLAB Code + Simulator)

๐Ÿ“˜ Overview of BER and SNR ๐Ÿงฎ Online Simulator for BER calculation of m-ary QAM and m-ary PSK ๐Ÿงฎ MATLAB Code for BER calculation of M-ary QAM, M-ary PSK, QPSK, BPSK, ... ๐Ÿ“š Further Reading ๐Ÿ“‚ View Other Topics on M-ary QAM, M-ary PSK, QPSK ... ๐Ÿงฎ Online Simulator for Constellation Diagram of m-ary QAM ๐Ÿงฎ Online Simulator for Constellation Diagram of m-ary PSK ๐Ÿงฎ MATLAB Code for BER calculation of ASK, FSK, and PSK ๐Ÿงฎ MATLAB Code for BER calculation of Alamouti Scheme ๐Ÿงฎ Different approaches to calculate BER vs SNR What is Bit Error Rate (BER)? The abbreviation BER stands for Bit Error Rate, which indicates how many corrupted bits are received (after the demodulation process) compared to the total number of bits sent in a communication process. BER = (number of bits received in error) / (total number of tran...

Comparing Baseband and Passband Implementations of m-ary QAM

  Let's assume your original message signal is: 1, 0, 1, 1, 1, 0, 1, 1, 0, 1. If you want to modulate it using 4-QAM, then your baseband signal will be: 4-QAM Symbols (Real + jImag) Symbol 0: -1.00 + j-1.00 Symbol 1: 1.00 + j-1.00 Symbol 2: -1.00 + j-1.00 Symbol 3: 1.00 + j-1.00 Symbol 4: 1.00 + j1.00   Now, if you want to transmit them through a typical wireless medium, you need to modulate the baseband signal with a carrier frequency (in our case, 50 Hz). The resulting passband signal looks like this               In the above code, the symbol rate is 5 symbols per second.   Detailed explanation 4-QAM Constellation Points In typical normalized 4-QAM, each symbol is mapped to a complex number: Bits Symbol (I + jQ) 00 -1 - 1j 01 -1 + 1j 11 +1 + 1j 10 +1 - 1j Each point lies on a square centered at the origin with I and Q values either +1 or -1. ...

Comparing Baseband and Passband Implementations of ASK, FSK, and PSK

๐Ÿ“˜ Overview ๐Ÿงฎ Baseband and Passband Implementations of ASK, FSK, and PSK ๐Ÿงฎ Difference betwen baseband and passband ๐Ÿ“š Further Reading ๐Ÿ“‚ Other Topics on Baseband and Passband ... ๐Ÿงฎ Baseband modulation techniques ๐Ÿงฎ Passband modulation techniques   Baseband modulation techniques are methods used to encode information signals onto a baseband signal (a signal with frequencies close to zero), allowing for efficient transmission over a communication channel. These techniques are fundamental in various communication systems, including wired and wireless communication. Here are some common baseband modulation techniques: Amplitude Shift Keying (ASK) [↗] : In ASK, the amplitude of the baseband signal is varied to represent different symbols. Binary ASK (BASK) is a common implementation where two different amplitudes represent binary values (0 and 1). ASK is simple but susceptible to noise...

Online Simulator for ASK, FSK, and PSK

Try our new Digital Signal Processing Simulator!   Start Simulator for binary ASK Modulation Message Bits (e.g. 1,0,1,0) Carrier Frequency (Hz) Sampling Frequency (Hz) Run Simulation Simulator for binary FSK Modulation Input Bits (e.g. 1,0,1,0) Freq for '1' (Hz) Freq for '0' (Hz) Sampling Rate (Hz) Visualize FSK Signal Simulator for BPSK Modulation ...

Theoretical vs. simulated BER vs. SNR for ASK, FSK, and PSK (MATLAB Code + Simulator)

๐Ÿ“˜ Overview ๐Ÿงฎ Simulator for calculating BER ๐Ÿงฎ MATLAB Codes for calculating theoretical BER ๐Ÿงฎ MATLAB Codes for calculating simulated BER ๐Ÿ“š Further Reading BER vs. SNR denotes how many bits in error are received for a given signal-to-noise ratio, typically measured in dB. Common noise types in wireless systems: 1. Additive White Gaussian Noise (AWGN) 2. Rayleigh Fading AWGN adds random noise; Rayleigh fading attenuates the signal variably. A good SNR helps reduce these effects. Simulator for calculating BER vs SNR for binary ASK, FSK, and PSK Calculate BER for Binary ASK Modulation Enter SNR (dB): Calculate BER Calculate BER for Binary FSK Modulation Enter SNR (dB): Calculate BER Calculate BER for Binary PSK Modulation Enter SNR (dB): Calculate BER BER vs. SNR Curves MATLAB Code for Theoretical BER % The code is written by SalimWireless.Com clc; clear; close all; % SNR va...