Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound...
-
Upload
junior-fleming -
Category
Documents
-
view
217 -
download
0
Transcript of Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound...
![Page 1: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/1.jpg)
Praat
LING115November 4, 2009
![Page 2: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/2.jpg)
Getting started
• Basic phonetic analyses with Praat– Creating sound objects
• Recording, reading from a file, creating from formula
– Analyzing sound objects• Selection• Pitch, intensity, formants
– Drawing• Sound wave, pitch/intensity/formant
contours• Saving
![Page 3: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/3.jpg)
Recording
• Sampling frequency– Number of samples taken per second– Higher sampling frequency
• More accurate digitization• A larger sound file
– 22050Hz is enough for speech analysis
![Page 4: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/4.jpg)
Reading from a file
• Supported file types– .wav– .aiff– .au– etc.
• Use “Open long sound file...” if the file is longer than two minutes
![Page 5: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/5.jpg)
Sound object
• Sound object is the object that will be analyzed, manipulated, ...
![Page 6: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/6.jpg)
Sound editor window
![Page 7: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/7.jpg)
Selection
![Page 8: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/8.jpg)
Zoom to selection
• Zoom in to selection (sel)
• Zoom out to view all (all)
![Page 9: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/9.jpg)
Pitch
![Page 10: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/10.jpg)
Pitch range settings
• Pitch analysis will find values only within the specified range
![Page 11: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/11.jpg)
Pitch extraction (in selection)
![Page 12: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/12.jpg)
Intensity
![Page 13: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/13.jpg)
Intensity range settings
• Some dB levels– Whisper, 5ft
= 30dB– Normal
conversation = 60dB
– Threshold of pain = 130dB
![Page 14: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/14.jpg)
Intensity listing
![Page 15: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/15.jpg)
Formants
a e i o u
F1 (Hz)
1000 500 320 500 320
F2 (Hz)
1400
2300
2500
1000 800
Frequency (Hz)0 11025
-20
0
20
![Page 16: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/16.jpg)
Formant listing
![Page 17: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/17.jpg)
Drawing – sound wave
![Page 18: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/18.jpg)
Drawing – pitch contour
![Page 19: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/19.jpg)
Drawing – intensity contour
![Page 20: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/20.jpg)
Drawing – formant contour
![Page 21: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/21.jpg)
Saving picture
![Page 22: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/22.jpg)
Segmentation and labeling
• TextGrid in Praat– Creating (interval) tiers– Adding intervals– Labeling intervals– Extracting values within the interval
• Exercise– F1 and F2 extraction from TextGrid– Creating a vowel chart
![Page 23: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/23.jpg)
Creating a TextGrid
![Page 24: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/24.jpg)
Starting the TextGrid Editor
• Select both the sound object and the textgrid object– Click on the sound
object– Hold the Ctrl-key– Click on the textgrid
object• Click “Edit”
![Page 25: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/25.jpg)
TextGrid Editor
![Page 26: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/26.jpg)
Selecting tiers
• Click on the tier
or
• View >– Select next tier– Select previous tier
![Page 27: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/27.jpg)
Adding intervals
• Click on the part of the wave form where you wish to mark the boundary
• Click on the small ring in the tier where you wish to add the intervalorInterval > Add interval on tier (tier-level)
![Page 28: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/28.jpg)
Labeling the interval
• Click on the tier or the interval within a tier
• Make sure the part that you want to edit is highlighted in yellow
• Type in the text to label the interval
![Page 29: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/29.jpg)
X-SAMPA
• A phonetic transcription system using ASCII characters
• http://en.wikipedia.org/wiki/Xsampa
![Page 30: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/30.jpg)
Information within the interval
• Select the interval• Make sure relevant
information is set to be displayed– e.g. Turn on “Show
intensity”• Choose the desired
menu to extract information related to the selected interval– e.g. “Get intensity”
![Page 31: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/31.jpg)
Praat scripting
• Object selection• Commands, arguments• Language elements
– Variables, formulas, jumps, loops• Listing multiple files in a directory• Scripting an editor from a shell
script
![Page 32: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/32.jpg)
Why?
• To save time and energy from repeating same/similar processes
![Page 33: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/33.jpg)
Reference
NB: Some of the examples are outdated
![Page 34: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/34.jpg)
Basic idea, for example
• Suppose we had a sequence of commands that we want to run repeatedly– e.g. “ Read from file > Select object >
Play “• We list the sequence of commands
(with arguments if necessary)• We specify how and under which
conditions we want to run the sequence of commands– e.g. Repeat over the entire list of .wav
files in the directory (folder)
![Page 35: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/35.jpg)
Getting started
• Or use your favorite text editor before you run the script
![Page 36: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/36.jpg)
Info window
• You can print out the extracted information or messages to the “Info” window
• echo <text>• clearinfo• print <text>• printline <text>
![Page 37: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/37.jpg)
Object selection
• select <type> <name>– select Sound
2500_1• plus <type>
<name>– plus Sound 2500_10
• minus <type> <name>– minus Sound
2500_1• select all• Remove
![Page 38: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/38.jpg)
Object selection – (2)• Objects have sequential ID, which begins
from 1 since the program started– {select, plus, minus} <ID>
• e.g. select 3, plus 3, minus 3• You can save the name, type+name, and ID
of the selected object to a variable– name$=selected$(“Sound”) or selected$
(“Sound”,2)– fullname$=selected$() or selected$(2)– id=selected (“Sound”, -1)
• The positive numbers are counted from the top of the object list
• The negative numbers are counted from the bottom of the object list
![Page 39: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/39.jpg)
Commands
• Once one or more objects are selected (or even when there is no object selected), you can choose from a set of menus or commands
• Some of these do not require any arguments to be specified– e.g. Play, Info, Edit, etc.
• For others, arguments should be specified– e.g. Query > Get mean...
![Page 40: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/40.jpg)
Commands – (2)
• For commands without arguments, you can simply type the command in a separate line in the script– e.g. Play
![Page 41: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/41.jpg)
Commands – (3)• For commands with arguments, you must
specify all the arguments in the script– <command>... <arg1> <arg2> ... <arg_n>
• Arguments are separated by space• If an argument contains a space, it must
be in double quotes• For check-box, “yes” to check and “no” to
uncheck• For radio button, write the text next to the
radio button you wish to select• Arguments are ordered left to right, top to
bottom
![Page 42: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/42.jpg)
Comments and white space
• White space (space and tab) at the beginning is ignored
• Start a line by #, !, or ; to add comments– e.g. # The next line does x,y,z
![Page 43: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/43.jpg)
Variables• Numeric variables
– Variable name must start with a lower case letter
– i=2• String variables
– Variable name must start in lower case and end with $
– i$=“hello”• Variables must be initialized before use• Variables in single quotes can substitute
parts of a string– name$=selected$(“Sound”,-1)– echo The name of the sound is ‘name$’
![Page 44: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/44.jpg)
Variables – (2)
• You can store the value from query commands, for example, in a variable– Query commands are the commands
that appear under “Query-”– mean = Get mean... All 0.0 0.0– If you don’t store the value in a variable,
it will be printed on the Info window
![Page 45: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/45.jpg)
Formulas
• Numbers– length=2– height=8– area=length*height/2
• Strings (there may be more...)– a$=“hello,”– b$=“ world!”– c$=a$+b$ (concatenate a$ and b$)– d$=a$-”o” (right strip the string from
a$)
![Page 46: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/46.jpg)
Formulas – (2)
• When a formula is used as an argument, you must make sure there is no white space between the terms in the formula– e.g. Get mean... length/2 length
• Unless the formula is in double quotes– e.g. Get mean... “length / 2” length
![Page 47: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/47.jpg)
Jumps• An if-then construct
– begins with if <expression> and ends with endif
– may have elsif <expression> or else in between
• Exampleif age<=3
length=1.20elsif age<=8
length=1.60else
length = 2.0endif
![Page 48: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/48.jpg)
“For” loops
• Repeats the statements within the “for” loop while variable takes on a value between <expression1> and <expression2>
for <variable> from <expression1> to <expression2><statement_1><statement_2>...
endfor
![Page 49: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/49.jpg)
“Repeat” loops
• Repeats the statements between repeat and until, while the <expression> after until is false
repeat<statement_1><statement_2>...
until <expression>
![Page 50: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/50.jpg)
“while” loops
• Statements between while <expression> and endwhile are repeated until <expression> is no longer true
while <expression><statement_1><statement_2>...
endwhile
![Page 51: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/51.jpg)
Listing filenames from a directory
• Create Strings as file list... <arg_1> <arg_2>– <arg_1> = name of the list– <arg_2>
• Directory, e.g. C:\linguistics\• Directory and the file type, e.g. C:\linguistics\*.wav
• “Edit” to view the listed filenames• “Get number of strings” to see how many
filenames are in the list• “Get string... <index>” to retrieve individual
filenames
![Page 52: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/52.jpg)
Examplepath$="C:\temp\"Create Strings as file list... temp 'path$'select Strings tempnumfiles=Get number of stringsfor i from 1 to numfiles
select Strings tempfilename$=Get string... ifullname$=path$+filename$Read from file... 'fullname$'soundname$=filename$-".wav"select Sound 'soundname$'Play
endforselect allRemove
![Page 53: Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.](https://reader036.fdocuments.net/reader036/viewer/2022062422/56649f2e5503460f94c4815a/html5/thumbnails/53.jpg)
Scripting an editor
• You can switch from the Praat objects window to the Editor window, and include the editor commands in your script
Editeditor <object_type> <object_name>
Editor-specific commands...
endeditor