Expt-10: Analysis by synthesis
Objective

The objective of this analysis-by-synthesis experiment is to break down the speech signal into different components such as the excitation source information (pitch and gain) and vocal tract system information (formants). The various components derived by analysis of the speech signal is used to resynthesise the speech signal. The use of analysis-by-synthesis framework is illustrated for prosody (pitch and duration) modification.

Tutorial

From a signal processing standpoint, it is very useful to think of speech production in terms of a model, as in Figure 1. The model shown is the simplest of its kind, but it includes all the principal components. The excitations for voiced and unvoiced speech are represented by an impulse train and white noise generator, respectively. The pitch of voiced speech is controlled by the spacing between impulses, $$T_p$$, and the amplitude (volume) of the excitation is controlled by the gain factor $$G$$. As the acoustical excitation travels from its source (vocal cords, or a constriction), the shape of the vocal tract alters the spectral content of the signal. The most prominent effect is the formation of resonances, which intensifies the signal energy at certain frequencies (called formants). As we learned in the Digital Filter Design lab, the amplification of certain frequencies may be achieved with a linear filter by an appropriate placement of poles in the transfer function. This is why the filter in our speech model utilizes an all-pole LTI filter. A more accurate model might include a few zeros in the transfer function, but if the order of the filter is chosen appropriately, the all-pole model is sufficient. The primary reason for using the all-pole model is the distinct computational advantage in calculating the filter coefficients, as will be discussed shortly.Recall that the transfer function of an all-pole filter has the form $$V(z)=\frac{1}{1−\sum_{k=1}^{P} a_k z^−k}$$, where $$P$$ is the order of the filter. This is an IIR filter that may be implemented with a recursive difference equation. With the input $$G x(n)$$, the speech signal $$s(n)$$ may be written as $$s(n)=\sum\limits_{k=1}^{P} a_k s(n−k)+G x(n)$$

Keep in mind that the filter coefficients will change continuously as the shape of the vocal tract changes, but speech segments of an appropriately small length may be approximated by a time-invariant model. This speech model is used in a variety of speech processing applications, including methods of speech recognition, speech coding for transmission, and speech synthesis. Each of these applications of the model involves dividing the speech signal into short segments, over which the filter coefficients are almost constant. For example, in speech transmission the bit rate can be significantly reduced by dividing the signal up into segments, computing and sending the model parameters for each segment (filter coefficients, gain, etc.), and re-synthesizing the signal at the receiving end, using a model similar to Figure 1. Most telephone systems use some form of this approach. Another example is speech recognition. Most recognition methods involve comparisons between short segments of the speech signals, and the filter coefficients of this model are often used in computing the “difference" between segments.

### Speech Coding and Synthesis

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 signal parameters (gain, filter coefficients, etc.), and a synthesis section which reconstructs the speech signal after transmission. Since we have introduced the speech model, and the estimation of LPC coefficients, 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.

Adapted from: Bouman, Charles A., "Lab 9b - Speech Processing (part 2)." Connexions. September 17, 2009. from http://cnx.org/content/m18087/1.3/ under the Creative Commons Attribution 2.0 Generic License.

Procedure
1. Study the characteristics of LP residual signal.

2. Study the characteristics of the resynthesised speech by using different excitation types, namely, LP residual, impulse excitation and random noise excitation.

3. Study the effect of using the vocal tract system derived using different LP orders for resynthesis.

4. Repeat the experiment for sentences recorded with your own voice.

Experiment

Observations
1. The LP residual signal within voiced regions of speech has large error values at regular intervals. These are the instants of glottal closure at which the vocal tract system is excited. Hence the LP residual signal can be approximated to the excitation source signal.

2. Resynthesis of the speech signal using the LP residual (excitation source) and the LPCs (vocal tract system) gives back the original speech signal.

3. The excitation source signal can be approximated by a train of impulses, but the quality of speech is poor though the message can be inferred easily.

4. The resynthesised speech signal sounds like a whispered speech when a random noise signal is used as the excitation source.

5. It can be seen that an LP order of as low as 3 can capture significant information on the message front even when an impulse train or random noise is used as the excitation. The quality of speech improves with the increase in the LP order. But using the original LP residual signal gives very good synthesis even for the 3rd order LP coefficients.

Assessment
1. Write a program (C/Matlab/Octave/Scilab) to separate the source and system of a given speech signal of 1 to 2 seconds using short-time LP analysis. Use a window size of 20 ms, a window shift of 10 ms, an LP order of 10. Plot the original signal and the LP residual signal.

2. Write a program (C/Matlab/Octave/Scilab) to resynthesize the speech signal given the sequence of LPCs and the following excitation signals:
• LP residual derived by using a specified LP order
• Train of unit impulses with a constant pitch of 10 ms.
• Train of impulses with the gain varying proportional to the LP residual signal
• White Gaussian random noise sequence with and without the gain of the LP residual signal imposed.

References
• Digital Processing of Speech Signals, L.R. Rabiner and L.R. Schafer, Chapter 8
• Discrete-Time Speech Signal Processing, Thomas F. Quatieri , Chapter 5