3
3
SPEECH PROCESSING
Linear Predictive Coding of Speech
Introduction
• Linear Predictive Coding (LPC) is a predominant technique for
estimating the basic speech parameters such as
• Pitch
• Formants
• Spectra
• Vocal Tract Area function
Applications:
• Low bit rate transmission
• Low bit rate storage
Advantages:
• Accurate estimation
• Computation speed is high
1
08-02-2025
Introduction
Basic concept:
• A speech sample is approximated as a linear combination of past speech
samples
• By minimizing the sum of squared differences (over a finite interval)
between the actual and the linearly predicted samples a unique set of
predictor coefficients (weighing coefficients) are determined
Formulations of LP Analysis:
1. Covariance method
2. Autocorrelation method
3. Lattice method
4. Inverse filter formulation
5. Spectral estimation formulation
6. Maximum likelihood formulation
7. Inner product formulation
2
08-02-2025
3
08-02-2025
4
08-02-2025
5
08-02-2025
Autocorrelation Method
• One approach to determine the limits on the sums in Eqs.(8) - (10) and
Eq.(12) is to assume that the waveform segment, 𝑠 (𝑚) ranges over 0 ≤ 𝑚 ≤
𝑁 − 1 otherwise expressed as,
𝑠 𝑚 = 𝑠 𝑚 + 𝑛 𝑤(𝑚) - (17)
where 𝑤(𝑚) is a finite length window over the interval 0 ≤ 𝑚 ≤ 𝑁 − 1
• Now the prediction error, 𝑒 𝑚 , for a 𝑝 order predictor will be defined over
the interval 0 ≤ 𝑚 ≤ 𝑁 − 1 + 𝑝 and hence the short-time average prediction
error is,
𝐸 =∑ 𝑒 (𝑚) - (18)
• Limits on the expression for 𝜙 𝑖, 𝑘 in Eq.(13) are identical to those of
Eq.(18). Hence,
𝜙 𝑖, 𝑘 = ∑ 𝑠 (𝑚 − 𝑖)𝑠 (𝑚 − 𝑘) - (19a)
Autocorrelation Method
• Eq.(19) can be expressed as,
( )
𝜙 𝑖, 𝑘 = ∑ 𝑠 (𝑚)𝑠 (𝑚 + 𝑖 − 𝑘) - (19b)
• From the above equation, 𝜙 𝑖, 𝑘 is identical to short-time autocorrelation
function evaluated for (𝑖 − 𝑘). That is,
𝜙 𝑖, 𝑘 = 𝑅 𝑖 − 𝑘 - (20)
where,
𝑅 𝑘 =∑ 𝑠 (𝑚)𝑠 (𝑚 + 𝑘) - (21)
• Since 𝑅 𝑘 is an even function,
, ,…,
𝜙 𝑖, 𝑘 = 𝑅 𝑖−𝑘 , ,…,
- (22)
6
08-02-2025
Autocorrelation Method
• Therefore Eq.(14) is expressed as,
∑ 𝛼 𝑅 𝑖−𝑘 =𝑅 𝑖 1≤𝑖≤𝑝 - (23)
• Similarly the minimum mean squared prediction error of Eq.(16) is of form
𝐸 =𝑅 0 −∑ 𝛼 𝑅 (𝑘) - (24)
• Eq.(23) can be expressed in matrix form as,
Covariance Method
• The second basic approach is to define the speech segment 𝑠 𝑚 and the
limits of the sums to fix the interval over mean-squared prediction error and
then to consider the effect on 𝜙 𝑖, 𝑘
• Define,
𝐸 =∑ 𝑒 (𝑚) - (26)
and hence 𝜙 𝑖, 𝑘 becomes,
𝜙 𝑖, 𝑘 = ∑ 𝑠 (𝑚 − 𝑖)𝑠 (𝑚 − 𝑘) - (27)
• If the index of summation is changed 𝜙 𝑖, 𝑘 can be expressed as,
𝜙 𝑖, 𝑘 = ∑ 𝑠 (𝑚)𝑠 (𝑚 + 𝑖 − 𝑘) - (28a)
or 𝜙 𝑖, 𝑘 = ∑ 𝑠 (𝑚)𝑠 (𝑚 + 𝑘 − 𝑖) - (28b)
7
08-02-2025
Covariance Method
• Eqs.(28) look similar to Eq.(19b) but not the same
• Eqs.(28) call for values of 𝑠 𝑚 outside the interval 0 ≤ 𝑚 ≤ 𝑁 − 1
• Evaluation of 𝜙 𝑖, 𝑘 for all values of 𝑖, 𝑘 requires the segment 𝑠 𝑚 interval
to change to −𝑝 ≤ 𝑚 ≤ 𝑁 − 1
• This approach is similar to the modified autocorrelation function and as
pointed out earlier that the approach leads to a function which is not an
autocorrelation but cross-correlation between two very similar but not
identical finite length segments of speech
• Hence the Eq.(14) which in this case contain cross-correlation values may be
used to compute the prediction coefficients
∑ 𝛼 𝜙 (𝑖, 𝑘) = 𝜙 𝑖, 0 𝑖 = 1,2, … . , 𝑝 - (14)
Covariance Method
• Eq.(14) can be expressed in matrix form as,
8
08-02-2025
9
08-02-2025
Applications of LPC
Pitch detection using LPC:
10
08-02-2025
11
08-02-2025
12