|

Select
a topic or read through:
Preliminaries
- Click here
to go directly to a quick guide for spectral
analysis.
- Spectral slices
(or cross-sections) show the amplitude/frequency
spectrum at a selected moment in the signal.
They are useful as aids to comparing local spectral
events or measuring spectral properties such
as formant frequencies, levels or bandwidths.
You should already be familiar with spectrograms
and formants.
How
Praat makes slices
- Praat offers two analysis methods:
FFT and LPC. This section describes FFT slices.
Click here for LPC
slices.
- Praat offers two procedures for FFT
slices: creation in the Sound editor
and creation in the Objects window. This
beginner's guide concentrates on the Sound
editor procedure and then gives a brief
outline of the Objects window procedure.
The preliminaries are the same for both procedures
- having a signal to work on, understanding
the parameter settings, deciding where to make
the slice etc.
Example
signals used to illustrate FFT slices
- A male and a female speaker are used to
illustrate the creation of spectral slices in
the Sound editor. The first is a Swedish
adult male speaker saying finns det
dokumentära inslag ("there are documentary
elements"):


Getting
started
- Load your signal into the Objects window,
select it and click Edit. The Sound
editor opens, showing the waveform of your
signal along with any analyses that you had
used on the previous occasion you had the Sound
editor open (Praat remembers
your analysis selections from one session to
the next).
- It is useful to have the spectrogram on
view (you can make slices from the waveform
only, but it is extremely helpful to find your
way about in the spectrogram). If the spectrogram
is not already visible, open the Spectrum
menu and tick Show spectrogram:

- Turn any other analyses off if they happen
to be visible. There is a long and a short way
to do this. The long way is to open each relevant analysis
menu in turn, and untick it (Pitch, Intensity,
Formant, Pulses as the case may
be). The short way is to open the View
menu and select Show analyses.

- Then, in the dialog box that appears, untick the
unwanted analyses (and in fact you could also
have selected the spectrogram here too,
and fixed all these selections and deselections in
one go):

- Note the setting for Longest analysis.
The spectrogram will be displayed only when
the length of signal on view in the Sound
editor is no longer than this setting. If
the portion of the signal on view is longer
than the Longest analysis setting,
you will get a warning. If you get this
warning, zoom in to a shorter portion of the
signal, until the spectrogram appears.
Parameter
settings
- The parameter settings for spectral slices
are the same as those already set for the spectrogram.
If you change any settings now for the slice, the
spectrogram will immediately be modified too.
To check the settings, open the Spectrum
menu and select Spectrogram settings.
The following dialog appears, showing your
current settings. Make any adjustments you need
(the parameters are explained as they arise
below). To restore the default settings, click
Revert to standards.

Wideband
and narrowband slices.
- Wideband slices show the formant structure
at the selected location, narrowband slices
show more detailed spectral structure (which
will be the voice harmonics if you are examining
a voiced segment). This works the same way as
for spectrograms.
The filter bandwidth is set at Window length
(s) in the Spectrogram settings dialog
box. The unit for this setting is
seconds and not Hz, and is the time constant
of the filter rather than the bandwidth.
- For wideband slices, a time constant of
4ms or 5ms will generally work well (but remember
it has to be entered in the settings box in
seconds, i.e. 0.004 or 0.005). The default setting
is 0.005s, which is fine for most adult male
voices, but might be on the large side
at slice locations where the voice fundamental
is relatively high (especially for men with
high pitched voices, for most women, or for
children). In this situation the voice
harmonics might intrude. If this occurs, a slightly
smaller time constant (0.004 or 0.003s) might
be more suitable. Experiment to find the best
setting for each voice and each slice location.
- For narrowband slices, set Window length
to 0.03s, which will be fine for both
male and female voices.
- The filter time constant also defines
the duration of the slice, such that a 5ms time
constant gives a 5ms wide slice, and so on.
This also means that a 5ms wideband slice may
well comprise less than one glottal pulse, while
a 30ms narrowband slice may comprise three or
more glottal pulses. Remember that Praat
balances the slice evenly around the cursor
location, so that you know precisely what part
of the signal is included. Here are examples
of wideband and narrowband slices from [i]-like
vowels by the male and female speaker respectively.
These can be compared with similar examples
created in the Objects
window at the same location.



- The same utterance contains an instance
of the difficult situation presented by a high
fundamental frequency. In the final vowel, the fundamental
rose to 326Hz and a widband slice taken there
with the default 0.005s window showed intruding
voice harmonics that confuse the identification
of the formants:

- Clearly, the fundamental frequency is so
high in this example that the formants appear
to coincide with voice harmonics. A slightly
smaller setting of Window length will
sometimes help exclude such intruding harmonics.
Reducing the window from the default 0.005s
to 0.003s gives the following:

- This is an improvement, but there are still
ambiguities. The first and second harmonics
still intrude and make it difficult to identify
F1 properly, and the eleventh and twelfth harmonics
still intrude and make F4 difficult to identify
properly. In this situation, an LPC slice is
often less ambiguous:

Windowing
funtion
- This is selected from the dropdown menu at
Window shape in the Spectrogram settings
dialog. The default, and recommended, window
function is Gaussian.
Dynamic
range
- This determines how far background noise
is allowed to intrude and show up in the spectrum
diagram. Noise is not usually a problem if your
signal has been recorded carefully in silent
conditions. Typical background noise comes from room
ventilation and air conditioning, road traffic
outside, aircraft passing overhead, computer
fans, other voices nearby. The default
dynamic range is 50dB (the weakest sound pressure
displayed in the spectrum diagram is 50dB below
the strongest sound pressure). Reduce this number
in 3db steps to exclude noise energy (as a rule,
once you have set this for the spectrogram you
can keep the same setting for the slices).
Where
to make your slice
Analysis
frame location
- You select a location for the slice by clicking
in the Sound editor window. But Praat
actually takes the spectrum at the nearest spectrogram
analysis frame. This frame location is determined
by Number of steps in the Spectrogram
settings dialog. The default setting is
1000 steps, which gives a step size of 2.5ms
if you have 2.5s of signal on view in the Sound
editor window, and in such a situation the
slice will be taken at anything up to 1.25ms
away from your cursor location. However,
it is good practice to zoom in around the slice
location in order to position the cursor more
precisely. The 1000 steps are then spread over
the zoomed area, for example if you are viewing
250ms of signal after zooming, the step size
will be 0.25ms and the difference between cursor
location and analysis frame location will have
become negligible.
Deciding
where to make the slice
- For now, while you are practicing the procedures
and parameter settings, it might not matter
where you make a slice. But for serious work,
the location of the slice will be defined uniquely
depending on your experiment design. Remember
you should zoom in to magnify the
area you are interested in, and you can specify
an exact location by opening the Select menu
and selecting Move cursor to. Here is
an example, to the left a brief portion of a
signal showing a sequence of a vowel and two
consonants [..ins..] with a small selection
during [i], and to the right that same selection
zoomed to one glottal pulse, allowing the cursor to
be positioned more precisely:

- Remember also that the waveform, and hence
the spectrum, of a speech signal is continuously
changing. Your slice will be misleading if
you miss the intended location by a few
milliseconds, or if your intended location is
not properly defined.
- The energy
distribution also changes within a glottal pulse. With
low pitched male voices (glottal pulses of 10ms
or more), it will be possible to make a
number of wideband slices within one glottal
pulse and each will be different. The energy
you see in voiced parts of a spectrogram (such
as to the left in the previous example) comes
from the stronger first part of each glottal
pulse, hence the typical vertical lines on the
spectrograms. The lighter gaps between these
vertical lines portray the weaker endings of
each glottal pulse. This is illustrated in the
next example. The next diagram shows the zoomed
waveform of part of an [i]-like vowel, with
one period shaded, representing one glottal
pulse. The two vertical lines A and B mark the
locations of two wideband slices 5ms apart so
that they will not overlap. A is in the stronger
early part of the pulse, B is in the weaker
latter part of the pulse.

- The next diagram compares the two broadband
slices (5ms Gaussian) taken at the positions
A and B respectively, illustrating this difference:

- This demonstrates (i) that the spectrum
varies within a glottal pulse, (ii) a wideband
slice can pick up that variation, (iii) an imprecision
of a few milliseconds can pick up that variation.
This emphasizes the need for careful definition
of what you are looking for when making a slice,
careful definition of a slice location
in order to find what you are looking for, and
(iii) careful selection of parameter settings
in order to see what you are looking for. To
see the spectrum of this glottal pulse, it would
be advisable to set the filter duration equal
to the length of the glottal period, i.e. around
10ms.
Creating
a slice in the Sound editor by FFT
- This method creates a slice directly from
the Sound editor and displays it in a
new window.
- Load your signal, open the Sound editor,
have the spectrogram on view to help you find
your way in the signal, adjust any analysis
settings as necessary, all as outlined above.
- Position the cursor precisely where the
slice is to be taken, zooming as necessary,
and taking advantage of Move cursor to
in the Select menu.
- In the Spectrum menu, click View
spectral slice:

- The slice appears in a new window.
- At the sime time a Spectrum object
named slice is placed in the Objects
list in the Objects window. You can
rename it (a good idea if you are making more
slices as part of your work).
Creating
an FFT slice in the Objects window
- This method requires the spectrum
location to be extracted as a Sound object
to the Objects list, and then an FFT
is performed on it there. The resulting spectrum
can be viewed from the Objects window.
- In the Sound editor, position the
cursor in the waveform or spectrogram where
you want the slice (see above).
- Make a selection at that location, evenly
balanced round the cursor position. This is
most easily done from the Select menu, clicking
Select and entering the endpoints of
the selection. The duration of the selection
defines the filter, e.g. 5ms for a wideband
slice, 30ms for a narrowband slice. In this
example the cursor is located at 0.133s and
a 5ms selection is being balanced around it
by entering the endpoints 0.1305 and 0.1355:

- Now extract the selection. Open the File
menu, click on Extract windowed selection:


- The default window function is Hanning.
The extracted selection has the default name
slice. This can be renamed here, or later
in the Objects window. The extracted
selection is listed as a Sound object
in the Objects window, with the name
given above, i.e. your new name or the default
name slice.
- Select this object, and then open the Spectrum
menu in the list of actions to the right, and
choose To Spectrum (fft):

- The FFT is calculated and a Spectrum
object is placed in the list, with the same
name as its Sound object. This object
can be renamed.
- Select the Spectrum object and click
the Edit button:



Printing
and saving FFT slice diagrams
- FFT slices are printed from the Picture
window, where they are transferred from
the Objects window. How to do this is
outlined in detail elsewhere,
but a necessary first step is to get the slice
into a Spectrum object in the Objects
list. This was outlined just above, both methods
putting a Spectrum object in the Objects list.
- Then mark out the area the FFT slice is
to occupy in the Picture window. Position the
mouse pointer where you want the top left corner,
then hold the left mouse button down and
drag the pointer to where you want the bottom
right corner. Then release the mouse button.
- Then go back to the Objects window,
select the Spectrum object, and click
the Draw button:

- The Draw spectrum dialog appears
where you can adjust settings that affect the
appearance of the spectrum diagram, then click
O.K. and the slice appears in the selected area
in the Picture window:

- This example was produced using the default
Draw spectrum settings.
- The commands for printing, or writing
image files, are in the File menu. Click
here for more details on printing
and saving FFT slices.
|
|