<< Chapter < Page Chapter >> Page >
  1. Compute the biased autocorrelation estimate of [link] for the lag values 0 m P . You may use the xcorr function for this.
  2. Form the r S and R S vectors as in [link] and [link] . Hint: Use the toeplitz function to form R S .
  3. Solve the matrix equation in [link] for a ^ .

To test your function, download the file test.mat , and load it into Matlab. This file contains two vectors: a signal x and its order-15 LPC coefficients a . Use your function to compute the order-15 LPC coefficients of x , and compare the result to the vector a .

Hand in your mylpc function.

Speech coding and synthesis

Download the file phrase.au for the following section.

One very effective application of LPC is the compression of speech signals.For example, an LPC vocoder (voice-coder) is a system used in many telephone systems to reduce the bit rate for the transmission of speech.This system has two overall components: an analysis section which computes signalparameters (gain, filter coefficients, etc.), and a synthesis section which reconstructs the speech signal after transmission.

Since we have introduced the speech model in "A Speech Model" , and the estimation of LPC coefficients in "Linear Predictive Coding" , we now have all the tools necessary to implement a simple vocoder.First, in the analysis section, the original speech signal will be split into short time frames.For each frame, we will compute the signal energy, the LPC coefficients, and determine whether the segment is voiced or unvoiced.

Download the file phrase.au . This speech signal is sampled at a rate of 8000 Hz.

  1. Divide the original speech signal into 30ms non-overlapping frames. Place the frames into L consecutive columns of a matrix S (use reshape ). If the samples at the tail end of the signal do not fill an entirecolumn, you may disregard these samples.
  2. Compute the energy of each frame of the original word, and place these values in a length L vector called energy .
  3. Determine whether each frame is voiced or unvoiced. Use your zero_cross function from the first weekto compute the number of zero-crossings in each frame.For length N segments with less than N 2 zero-crossings, classify the segment as voiced, otherwise unvoiced.Save the results in a vector VU which takes the value of “1" for voiced and “0" for unvoiced.
  4. Use your mylpc function to compute order-15 LPC coefficients for each frame. Place each set of coefficients into a column of a 15 × L matrix A .

To see the reduction in data, add up the total number of bytes Matlab uses to store the encoded speech in the arrays A , VU , and energy . (use the whos function). Compute the compression ratio by dividing this by the number of bytes Matlab uses to store the original speech signal.Note that the compression ratio can be further improved by using a technique called vector quantization on the LPC coefficients, and also by using fewer bits to represent the gain and voiced/unvoiced indicator.

Now the computed parameters will be used to re-synthesize the phrase using the model in [link] . Similar to your exciteV function from "Synthesis of Voiced Speech" , create a function x=exciteUV(N) which returns a length N excitation for unvoiced speech (generate a Normal(0,1) sequence).Then for each encoded frame do the following:

  1. Check if current frame is voiced or unvoiced.
  2. Generate the frame of speech by using the appropriate excitation into the filter specified by the LPC coefficients (you did this in "Synthesis of Voiced Speech" ). For voiced speech, use a pitch period of 7.5 ms. Make sure your synthesized segment is the same length as the original frame.
  3. Scale the amplitude of the segment so that the synthesized segment has the same energy as the original.
  4. Append the frame to the end of the output vector.

Listen to the original and synthesized phrase. Can you recognize the synthesized version as coming from the same speaker?What are some possible ways to improve the quality of the synthesized speech? Subplot the two speech signals in the same figure.

Inlab report

Hand in the following:
  • Your analysis and synthesis code.
  • The compression ratio.
  • Plots of the original and synthesized words.
  • Comment on the quality of your synthesized signal. How might the quality be improved?

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Purdue digital signal processing labs (ece 438). OpenStax CNX. Sep 14, 2009 Download for free at http://cnx.org/content/col10593/1.4
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?

Ask