<< Chapter < Page Chapter >> Page >

Given this background, we would now like you to create a spectrogram using your DFTwin() function from the previous section. You will do this by creating a matrix of windowed DFTs, oriented asdescribed above. Your function should be of the form

A = Specgm(x,L,overlap,N)

where x is your input signal, L is the window length, overlap is the number of points common to successive windows, and N is the number of points you compute in each DFT. Within your function, you should plot themagnitude (in dB) of your spectrogram matrix using the command imagesc() , and label the time and frequency axes appropriately.

Important hints

  • Remember that frequency in a spectrogram increases along the positive y-axis, which means that the first few elements of eachcolumn of the matrix will correspond to the highest frequencies.
  • Your DFTwin() function returns the DT spectrum for frequencies between 0 and 2 π . Therefore, you will only need to use the first or second half of these DFTs.
  • The statement B(:,n) references the entire n t h column of the matrix B .
  • In labeling the axes of the image, assume a sampling frequency of 8 KHz. Then the frequency will range from 0 to 4000 Hz.
  • The axis xy command will be needed in order to place the origin of your plot in the lower left corner.
  • You can get a standard gray-scale mapping (darker means greater magnitude) by using the command colormap(1-gray) , or a pseudo-color mapping using the command colormap(jet) . For more information, see the online help for the image command.

Download the file signal.mat , and load it into Matlab. This is a raised square wave that is modulated by a sinusoid.What would the spectrum of this signal look like? Create both a wideband and a narrowband spectrogram using your Specgm() function for the signal.

  • For the wideband spectrogram, use a window length of 40 samples and an overlap of 20 samples.
  • For the narrowband spectrogram, use a window length of 320 samples, and anoverlap of 60 samples.

Subplot the wideband and narrowband spectrograms, and the original signal in the same figure.

Hand in your code for Specgm() and your plots. Do you see vertical striations in the wideband spectrogram? Similarly, do you see horizontalstriations in the narrowband spectrogram? In each case, what causes these lines, and what does the spacing between them represent?

Formant analysis

Download the file vowels.mat for the following section.

The shape of an acoustic excitation for voiced speech is similar to a triangle wave. Therefore it has many harmonics at multiples of itsfundamental frequency, 1 / T p . As the excitation propagates through the vocal tract, acoustic resonances, or standing waves,cause certain harmonics to be significantly amplified. The specific wavelengths, hence the frequencies, of the resonances are determinedby the shape of the cavities that comprise the vocal tract. Different vowel sounds are distinguished by unique sets of these resonances, or formant frequencies . The first three average formants for several vowels are given in [link] .

Average Formant Frequencies for the Vowels. See [link] .

A possible technique for speech recognition would to determine a vowel utterance based on its unique set of formant frequencies.If we construct a graph that plots the second formant versus the first, we find that a particular vowel sound tends to lie within acertain region of the plane. Therefore, if we determine the first two formants, we can construct decision regions to estimatewhich vowel was spoken. The first two average formants for some common vowels are plotted in [link] . This diagram is known as the vowel triangle due to the general orientation of the average points.

Keep in mind that there is a continuous range of vowel sounds that can be produced by a speaker. When vowels are used in speech, their formantsmost often slide from one position to another.

Download the file vowels.mat , and load it into Matlab. This file contains the vowel utterances a,e,i,o , and u from a female speaker. Load this into Matlab, and plot a narrowbandspectrogram of each of the utterances. Notice how the formant frequencies change with time.

For the vowels a and u , estimate the first two formant frequencies using the functions you createdin the previous sections. Make your estimates at a time frame toward the beginning of the utterance,and another set of estimates toward the end of the utterance. You may want to use both the Specgm and DFTwin functions to determine the formants. Plot these four points in the vowel triangleprovided in [link] . For each vowel, draw a line connecting the two points, and draw anarrow indicating the direction the formants are changing as the vowel is being uttered.

Hand in your formant estimates on the vowel triangle.
The Vowel Triangle

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