ArticleslgStudy

science

Code-excited linear prediction

Code-excited linear prediction is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Code-excited linear prediction rather than just read about it. In short: Code-excited linear prediction (CELP) is a linear predictive speech coding algorithm originally proposed by Manfred R. Schroeder and Bishnu S.

Code-excited linear prediction — main illustration
Code-excited linear prediction — illustration

Key takeaways

  • Code-excited linear prediction belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Code-excited linear prediction to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Code-excited linear prediction from memory before moving on to harder problems.

Reference excerpt

Code-excited linear prediction (CELP) is a linear predictive speech coding algorithm originally proposed by Manfred R. Schroeder and Bishnu S. Atal in 1985. At the time, it provided significantly better quality than existing low bit-rate algorithms, such as residual-excited linear prediction (RELP) and linear predictive coding (LPC) vocoders (e.g., FS-1015). Along with its variants, such as algebraic CELP, relaxed CELP, low-delay CELP and vector sum excited linear prediction, it is currently the most widely used speech coding algorithm. It is also used in MPEG-4 Audio speech coding. CELP is commonly used as a generic term for a class of algorithms and not for a particular codec.

Background The CELP algorithm is based on four main ideas:

Using the source–filter model of speech production through linear prediction (LP) (see the textbook "speech coding algorithm"); Using an adaptive and a fixed codebook as the input (excitation) of the LP model; Performing a search in closed-loop in a "perceptually weighted domain". Applying vector quantization (VQ) The original algorithm as simulated in 1983 by Schroeder and Atal required 150 seconds to encode 1 second of speech when run on a Cray-1 supercomputer. Since then, more efficient ways of implementing the codebooks and improvements in computing capabilities have made it possible to run the algorithm in embedded devices, such as mobile phones.

CELP decoder

Before exploring the complex encoding process of CELP we introduce the decoder here. Figure 1 describes a generic CELP decoder. The excitation is produced by summing the contributions from fixed (a.k.a. stochastic or innovation) and adaptive (a.k.a. pitch) codebooks:

e[n]=ef[n]+ea[n] where ef[n] is the fixed (a.k.a. stochastic or innovation) codebook contribution and ea[n] is the adaptive (pitch) codebook contribution. The fixed codebook is a vector quantization dictionary that is (implicitly or explicitly) hard-coded into the codec. This codebook can be algebraic (ACELP) or be stored explicitly (e.g. Speex). The entries in the adaptive codebook consist of delayed versions of the excitation. This makes it possible to efficiently code periodic signals, such as voiced sounds. The filter that shapes the excitation has an all-pole model of the form 1/A(z), where A(z) is called the prediction filter and is obtained using linear prediction (Levinson–Durbin algorithm). An all-pole filter is used because it is a good representation of the human vocal tract and because it is easy to compute.

CELP encoder The main principle behind CELP is called analysis-by-synthesis (AbS) and means that the encoding (analysis) is performed by perceptually optimizing the decoded (synthesis) signal in a closed loop. In theory, the best CELP stream would be produced by trying all possible bit combinations and selecting the one that produces the best-sounding decoded signal. This is obviously not possible in practice for two reasons: the required complexity is beyond any currently available hardware and the “best sounding” selection criterion implies a human listener. In order to achieve real-time encoding using limited computing resources, the CELP search is broken down into smaller, more manageable, sequential searches using a simple perceptual weighting function. Typically, the encoding is performed in the following order:

Linear prediction coefficients (LPC) are computed and quantized, usually as line spectral pairs (LSPs). The adaptive (pitch) codebook is searched and its contribution removed. The fixed (innovation) codebook is searched.

Noise weighting Most (if not all) modern audio codecs attempt to shape the coding 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, CELP minimizes the error for the perceptually weighted domain. The weighting filter W(z) is typically derived from the LPC filter by the use of bandwidth expansion:

W(z)=A(z/γ1)A(z/γ2) where γ1>γ2.

See also MPEG-4 Part 3 (CELP as an MPEG-4 Audio Object Type) G.728 – Coding of speech at 16 kbit/s using low-delay code excited linear prediction G.718 – uses CELP for the lower two layers for the band (50–6400 Hz) in a two-stage coding structure G.729.1 – uses CELP coding for the lower band (50–4000 Hz) in a three-stage coding structure Comparison of audio coding formats CELT is a related audio codec that borrows some ideas from CELP.

References B.S. Atal, "The History of Linear Prediction," IEEE Signal Processing Magazine, vol. 23, no. 2, March 2006, pp. 154–161. M. R. Schroeder and B. S. Atal, "Code-excited linear prediction (CELP): high-quality speech at very low bit rates," in Proceedings of the IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP), vol. 10, pp. 937–940, 1985.

External links This article is based on a paper presented at Linux.Conf.Au Some parts based on the Speex codec manual reference implementations of CELP 1016A (CELP 3.2a) and LPC 10e. Archived 2016-12-12 at the Wayback Machine Linear Predictive Coding (LPC)

Selected readings Introduction to CELP Coding Speech Processing: Theory of LPC Analysis and Synthesis Archived 2014-06-15 at the Wayback Machine

Worked examples

Example 1 — a first encounter with Code-excited linear prediction

Start with the simplest possible case. Write down what Code-excited linear prediction claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Code-excited linear prediction before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Code-excited linear prediction ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Code-excited linear prediction

In research
Code-excited linear prediction appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Code-excited linear prediction in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Code-excited linear prediction is common in secondary-school and first-year university syllabi. It links to neighbouring topics Data compression, Speech codecs, so understanding it makes those chapters shorter.
In everyday life
Look for Code-excited linear prediction outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Code-excited linear prediction” →

How to study Code-excited linear prediction in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Code-excited linear prediction means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Code-excited linear prediction out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Code-excited linear prediction in simple terms?

Code-excited linear prediction (CELP) is a linear predictive speech coding algorithm originally proposed by Manfred R. Schroeder and Bishnu S.

Why does Code-excited linear prediction matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Code-excited linear prediction?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Code-excited linear prediction.

Tags

  • Data compression
  • Speech codecs

Keep exploring