<< 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.
DFTwin()
function returns the DT spectrum for frequencies
between 0 and
. Therefore, you will only need to use the
first or second half of these DFTs.B(:,n)
references the entire
column
of the matrix
.axis xy
command will be needed in order to
place the origin of your plot in the lower left corner.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.
Subplot the wideband and narrowband spectrograms, and the original signal in the same figure.
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?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, . 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] .
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.
Notification Switch
Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?