<< Chapter < Page Chapter >> Page >
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.

Matlab exercises

First, take a simple signal ( e.g. , one period of a sinusoid at some frequency) and plot itsautocorrelation 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 r s s l maximized and why? Is there any symmetry in r s s l ? What does r s s 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 r s s 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 files on the PC using Sound Recorder or a similar application. Typically, a sample rateof 8 kHz is a good choice for voice signals, which are approximately bandlimited to 4 kHz. You will use these audio files to test algorithms in MATLAB. The functions wavread , wavwrite , sound will help you read, write and play audio files in MATLAB:

The output of the algorithm is the prediction coefficients a k (usually about P 10 coefficients is sufficient), which represent the speech segment containing significantly more samples. The LPCcoefficients are thus a compressed representation of the original speech segment, and we take advantage of this bysaving or transmitting the LPC coefficients instead of the speech samples. Compare the coefficients generated by yourfunction with those generated by the levinson or lpc functions available in the MATLAB toolbox. Next, plot the frequency response of the IIR model representedby the LPC coefficients (see Speech Processing: Theory of LPC Analysis and Synthesis ). What is the fundamental frequency of the speech segment? Is there any similarity in the predictioncoefficients for different 20 - 30 ms segments of the same vowel sound? How could the prediction coefficients be used for recognition?

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Dsp laboratory with ti tms320c54x. OpenStax CNX. Jan 22, 2004 Download for free at http://cnx.org/content/col10078/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Dsp laboratory with ti tms320c54x' conversation and receive update notifications?

Ask