Speex is based on CELP, which stands for Code Excited Linear Prediction. This section attempts to introduce the principles behind CELP, so if you are already familiar with CELP, you can safely skip to section 7. The CELP technique is based on three ideas:

 

  1. The use of a linear prediction (LP) model to model the vocal tract
  2. The use of (adaptive and fixed) codebook entries as input (excitation) of the LP model
  3. The search performed in closed-loop in a ``perceptually weighted domain''

This section describes the basic ideas behind CELP. Note that it's still incomplete.

 


Linear Prediction (LPC)

Linear prediction is at the base of many speech coding techniques, including CELP. The idea behind it is to predict the signal Introduction to CELP Coding using a linear combination of its past samples:

 

 

Introduction to CELP Coding

 

 

where Introduction to CELP Coding is the linear prediction of Introduction to CELP Coding. The prediction error is thus given by: 

 

Introduction to CELP Coding

 

 

The goal of the LPC analysis is to find the best prediction coefficients Introduction to CELP Coding which minimize the quadratic error function: 

 

Introduction to CELP Coding

 

 

That can be done by making all derivatives Introduction to CELP Coding equal to zero: 

 

Introduction to CELP Coding

 

 

The Introduction to CELP Coding filter coefficients are computed using the Levinson-Durbin algorithm, which starts from the auto-correlation Introduction to CELP Coding of the signal Introduction to CELP Coding.

 

 

Introduction to CELP Coding

 

 

For an order Introduction to CELP Coding filter, we have: 

 

Introduction to CELP Coding

 

 

 

 

Introduction to CELP Coding

 

 

The filter coefficients Introduction to CELP Coding are found by solving the system Introduction to CELP Coding. What the Levinson-Durbin algorithm does here is making the solution to the problem Introduction to CELP Codinginstead of Introduction to CELP Coding by exploiting the fact that matrix Introduction to CELP Coding is toeplitz hermitian. Also, it can be proven that all the roots of Introduction to CELP Coding are within the unit circle, which means that Introduction to CELP Coding is always stable. This is in theory; in practice because of finite precision, there are two commonly used techniques to make sure we have a stable filter. First, we multiply Introduction to CELP Coding by a number slightly above one (such as 1.0001), which is equivalent to adding noise to the signal. Also, we can apply a window to the auto-correlation, which is equivalent to filtering in the frequency domain, reducing sharp resonances.

The linear prediction model represents each speech sample as a linear combination of past samples, plus an error signal called the excitation (or residual). 

 

Introduction to CELP Coding

 

 

In the z-domain, this can be expressed as

 

 

Introduction to CELP Coding

 

 

where Introduction to CELP Coding is defined as

 

 

Introduction to CELP Coding

 

 

We usually refer to Introduction to CELP Coding as the analysis filter and Introduction to CELP Coding as the synthesis filter. The whole process is called short-term prediction as it predicts the signal Introduction to CELP Codingusing a prediction using only the Introduction to CELP Coding past samples, where Introduction to CELP Coding is usually around 10.

Because LPC coefficients have very little robustness to quantization, they are converted to Line Spectral Pair (LSP) coefficients which have a much better behaviour with quantization, one of them being that it's easy to keep the filter stable.

 


Pitch Prediction

During voiced segments, the speech signal is periodic, so it is possible to take advantage of that property by approximating the excitation signal Introduction to CELP Coding by a gain times the past of the excitation:

 

 

Introduction to CELP Coding

 

 

where Introduction to CELP Coding is the pitch period, Introduction to CELP Coding is the pitch gain. We call that long-term prediction since the excitation is predicted from Introduction to CELP Coding with Introduction to CELP Coding.

 

Innovation Codebook

The final excitation Introduction to CELP Coding will be the sum of the pitch prediction and an innovation signal Introduction to CELP Coding taken from a fixed codebook, hence the name Code Excited Linear Prediction. The final excitation is given by:

 

 

Introduction to CELP Coding

 

 

The quantization of Introduction to CELP Coding is where most of the bits in a CELP codec are allocated. It represents the information that couldn't be obtained either from linear prediction or pitch prediction. In the z-domain we can represent the final signal Introduction to CELP Coding as 

 

Introduction to CELP Coding

 

 

 


Analysis-by-Synthesis and Error Weighting

Most (if not all) modern audio codecs attempt to ``shape'' the noise so that it appears mostly in the frequency regions where the ear cannot detect it. For example, the ear is more tolerant to noise in parts of the spectrum that are louder and vice versa. That's why instead of minimizing the simple quadratic error 

 

Introduction to CELP Coding

 

 

where Introduction to CELP Coding is the encoder signal, we minimize the error for the perceptually weighted signal 

 

Introduction to CELP Coding

 

 

where Introduction to CELP Coding is the weighting filter, usually of the form

 

Introduction to CELP Coding (1)

 

with control parameters Introduction to CELP Coding. If the noise is white in the perceptually weighted domain, then in the signal domain its spectral shape will be of the form 

 

Introduction to CELP Coding

 

 

If a filter Introduction to CELP Coding has (complex) poles at Introduction to CELP Coding in the Introduction to CELP Coding-plane, the filter Introduction to CELP Coding will have its poles at Introduction to CELP Coding, making it a flatter version of Introduction to CELP Coding.

Analysis-by-synthesis refers to the fact that when trying to find the best pitch parameters (Introduction to CELP CodingIntroduction to CELP Coding) and innovation signal Introduction to CELP Coding, we do not work by making the excitation Introduction to CELP Coding as close as the original one (which would be simpler), but apply the synthesis (and weighting) filter and try making Introduction to CELP Coding as close to the original as possible.

 

参考资料:

1 百科总结: https://zh.wikipedia.org/wiki/%E7%A0%81%E6%BF%80%E5%8A%B1%E7%BA%BF%E6%80%A7%E9%A2%84%E6%B5%8B
2 详细介绍: http://ntools.net/arc/Documents/speex/manual/node8.html

相关文章:

  • 2021-12-04
  • 2022-01-17
  • 2021-12-02
  • 2021-10-19
  • 2021-11-30
  • 2022-01-16
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-03
  • 2021-09-30
  • 2022-01-14
  • 2021-10-04
  • 2021-06-09
  • 2021-10-01
  • 2021-11-12
相关资源
相似解决方案