Вы находитесь на странице: 1из 2

Connexions module: m10824

Speech Processing: LPC Exercise in MATLAB


Douglas L. Jones Swaroop Appadwedula Matthew Berry Mark Haun Jake Janovetz Michael Kramer Dima Moussa Daniel Sachs Brian Wade
This work is produced by The Connexions Project and licensed under the Creative Commons Attribution License

Abstract
You will write MATLAB code to compute the autocorrelation sequence of a simple signal. Then you will implement the Levinson-Durbin algorithm in MATLAB and analyze a recording of your own voice.

1 MATLAB Exercises
First, take a simple signal (e.g., one period of a sinusoid at some frequency) and plot its autocorrelation sequence for appropriate values of l. You may wish to use the xcorr MATLAB function to compare with your own version of this function. At what time shift l is rss [l] maximized and why? Is there any symmetry in rss [l]? What does rss [l] look like for periodic signals? Next, write your own version of the Levinson-Durbin algorithm in MATLAB. Note that MATLAB uses indexing from 1 rather than 0. One way to resolve this problem is to start the loop with i = 2, then shift the variables k, E , , and rss to start at i = 1 and j = 1. Be careful with indices such as i j , since these could still be 0. Apply your algorithm to a 20- 30 ms segment of a speech signal. Use a microphone to record .wav audio les on the PC using Sound Recorder or a similar application. Typically, a sample rate of 8 kHz is a good choice for voice signals, which are approximately bandlimited to 4 kHz. You will use these audio les to test algorithms in MATLAB. The functions wavread, wavwrite, sound will help you read, write and play audio les in MATLAB:
Version http://creativecommons.org/licenses/by/1.0

2.5: Feb 25, 2004 12:41 pm US/Central

http://cnx.org/content/m10824/2.5/

Connexions module: m10824

The output of the algorithm is the prediction coecients ak (usually about P = 10 coecients is sucient), which represent the speech segment containing signicantly more samples. The LPC coecients are thus a compressed representation of the original speech segment, and we take advantage of this by saving or transmitting the LPC coecients instead of the speech samples. Compare the coecients generated by your function with those generated by the levinson or lpc functions available in the MATLAB toolbox. Next, plot the frequency response of the IIR model represented by the LPC coecients (see Speech Processing: Theory of LPC Analysis and Synthesis ). What is the fundamental frequency of the speech segment? Is there any similarity in the prediction coecients for dierent 20- 30 ms segments of the same vowel sound? How could the prediction coecients be used for recognition?
1

1 "Speech Processing: Theory of LPC Analysis and Synthesis", (5) <http://cnx.org/content/m10482/latest/#eq5>

http://cnx.org/content/m10824/2.5/

Вам также может понравиться