Docsity

Linear Predictive Coding for Speech Processing - Lab | EE 275, Lab Reports of Digital Signal Processing

Toggle sidebar
bg1
E E 2 7 5 Lab July 12, 2006
Linear Predictive Coding for Speech Processing
Introduction
Some signals can be compressed and recovered using a form of autoregressive filtering known
as linear predictive coding (LPC). This lab will examine the LPC model.
Autoregressive models use past behavior of a process to predict its future behavior. The
most basic model uses just one sample of past behavior, AR(1):
f(n) = ρ1f(n−1) + n(n)
where n(n) is Gaussian white noise. (This is also known as a Markov process.)
Higher-order models are extensions of the first-order model. Here is AR(2):
f(n) = ρ1f(n−1) + ρ2f(n−2) + n(n)
Here is AR(p):
f(n) = ρ1f(n−1) + ρ2f(n−2) + . . . +ρpf(n−p) + n(n)
LPC10 (p= 10) is often used for speech processing.
Matlab Simulink LPC Demo
In this lab, you’ll be using Microsoft Windows-specific tools for getting a signal into and out
of Matlab.
(If you know that the microphone and speakers are working on your system, you can skip
ahead to Microphone and Speakers in Simulink, below.)
c
2006GM
pf3
pf4

Partial preview of the text

Download Linear Predictive Coding for Speech Processing - Lab | EE 275 and more Lab Reports Digital Signal Processing in PDF only on Docsity!

E E 2 7 5 Lab July 12, 2006

Linear Predictive Coding for Speech Processing

Introduction

Some signals can be compressed and recovered using a form of autoregressive filtering known as linear predictive coding (LPC). This lab will examine the LPC model.

Autoregressive models use past behavior of a process to predict its future behavior. The most basic model uses just one sample of past behavior, AR(1):

f (n) = ρ 1 f (n − 1) + n(n)

where n(n) is Gaussian white noise. (This is also known as a Markov process.)

Higher-order models are extensions of the first-order model. Here is AR(2):

f (n) = ρ 1 f (n − 1) + ρ 2 f (n − 2) + n(n)

Here is AR(p):

f (n) = ρ 1 f (n − 1) + ρ 2 f (n − 2) +... + ρpf (n − p) + n(n)

LPC10 (p = 10) is often used for speech processing.

Matlab Simulink LPC Demo

In this lab, you’ll be using Microsoft Windows-specific tools for getting a signal into and out of Matlab.

(If you know that the microphone and speakers are working on your system, you can skip ahead to Microphone and Speakers in Simulink, below.)

©c2006GM

Test the Microphone and Speakers

Start and set up the Sound Recorder utility:

  • Start / Accessories / Entertainment / Sound Recorder
  • Edit/Audio Properties
  • Under Sound Recording, click the Volume button.
  • Maximize the volume under Microphone.
  • Check the Select box under Microphone.
  • Exit the Recording Control dialog box.

Try recording some speech with the Sound Recorder:

  • Click on the red circle to start recording.
  • Click on the black rectangle to stop.
  • Play back the sound. (You might have to adjust the speaker volume, either in the system volume controls or on the speakers themselves, in order to hear the sound.)
  • Adjust the volume setting on the microphone as required and try again until you get a clean recording.

Microphone and Speakers in Simulink

Start Matlab, then start Simulink by typing: simulink

The Simulink Library Browser will come up.

Select from the pulldown menus:

  • File / New / Model

Get the necessary Simulink blocks:

  • Signal Processing Blockset / Platform Specific I/O / Windows (Win32)
  • Find the From Wave Device block and drag it to the new model window.
  • Find the To Wave Device block and drag it to the new model window.

Test the Simulink blocks:

  • Connect the two blocks with the mouse by left-clicking on one port and dragging to the other port.
  • Menu pulldown: Simulation / Configuration Parameters
  • Set Start Time to 0.0 and Stop Time to 5.0, then click OK.

How can you modify the model to verify that it is performing the processing that it claims to perform?

(The material in this lab handout was put together by Paul Beliveau and derives principally from the MathWorks training document “Simulink for Signal Processing”, 2006.)

©^ c2006GM