1、Using Praat for Linguistic ResearchWill StylerUniversity of Colorado at Boulder Phonetics LabDocument Version: 1.3.6Last Update: October 2, 2013Important!This document will be continually updated and improved. Download the latest version at:http:/savethevowels.org/praatUsing Praat for Linguistic Res
2、earch by Will Styler is licensed under a Creative CommonsAttribution-ShareAlike 3.0 Unported License. For more information on the specifics of thislicense, go to http:/creativecommons.org/licenses/by-sa/3.0/.1Contents1 Version History 42 Introduction 52.1 Versions . . . . . . . . . . . . . . . . . .
3、 . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 Other Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.3 Getting and Installing Praat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 About Praat 63.1 Praat Windows . . . . .
4、. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Recording Sounds 85 Opening and Saving Files 85.1 Opening Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85.1.1 Working with longer sound files . . . . . . . . . . . . . . . . . . . .
5、. . . . . 95.2 Saving Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Phonetic Measurement and Analysis in Praat 96.1 Working with Praat Waveforms and Spectrograms . . . . . . . . . . . . . . . . . . . 96.1.1 Pulling out a smaller section of the file fo
6、r analysis . . . . . . . . . . . . . . 116.2 Adjusting the Spectrogram settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116.2.1 Narrowband vs. Broadband Spectrograms . . . . . . . . . . . . . . . . . . . 126.3 Measuring Duration . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7、 . . . . . . . . . 136.3.1 Measuring Voice Onset Time (VOT) . . . . . . . . . . . . . . . . . . . . . . . 136.4 Examining and measuring F0/Pitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146.4.1 Measuring F0 from a single cycle . . . . . . . . . . . . . . . . . . . . . . . . . 146.4.2
8、Viewing Pitch via a narrowband spectrogram . . . . . . . . . . . . . . . . . 146.4.3 Using Praats Pitch Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156.4.4 Improving Pitch tracking by changing the Pitch Settings . . . . . . . . . . . 156.4.5 Scripting only: Creating a Pitch Obje
9、ct . . . . . . . . . . . . . . . . . . . . . 176.4.6 Getting Maximum, Minimum, and Average pitch for a section of speech . 176.5 Measuring Pulses, Jitter, Shimmer, and Harmonics-to-noise ratio . . . . . . . . . . 176.6 Measuring Formants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10、. . . . . . 186.6.1 Using the Formant tools in the Editor window . . . . . . . . . . . . . . . . . 186.6.2 Improving Formant Finding results . . . . . . . . . . . . . . . . . . . . . . . . 196.6.3 Scripting Only: Formant Objects . . . . . . . . . . . . . . . . . . . . . . . . . 216.7 Measuring Inten
11、sity/Amplitude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216.8 Working with Spectra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226.9 Taking a spectral slice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226.10 Measuring Harmoni
12、c Amplitude, Frequency . . . . . . . . . . . . . . . . . . . . . . . 2326.11 Measuring Creakiness and Breathiness using Spectral Tilt . . . . . . . . . . . . . . 236.12 Measuring Nasality using A1-P0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246.13 Measuring Spectral Center of Grav
13、ity . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 Creating and manipulating sound Files in Praat 277.1 Creating sounds from Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277.2 Cropping, Copying, Splicing and Pasting . . . . . . . . . . . . . . . . . . . . . . . .
14、. 287.3 Sampling rates and Resampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297.4 Filtering Sounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307.4.1 Low-pass filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307.
15、4.2 High-pass filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317.4.3 Band-pass (notch) filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317.5 Pitch Manipulation (To Manipulation.) . . . . . . . . . . . . . . . . . . . . . . . . . 327.6 Matching the p
16、itch tracks of two sounds . . . . . . . . . . . . . . . . . . . . . . . . . 327.7 Manipulating Duration (Slowing Down and Speeding Up Sounds) . . . . . . . . . 347.8 Matching Intensity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357.9 Combining Sounds . . . . . . . .
17、. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357.10 Formula Modification: Waveform addition, subtraction and so much more . . . . 367.11 Synthesizing Sounds from scratch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397.12 Source-Filter Vowel Resynthesis . . . . . . . . .
18、. . . . . . . . . . . . . . . . . . . . . 398 Exporting images for use and publication 418.1 Creating Complex Displays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438.1.1 Overlaying Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438.1.2 Multiple Plo
19、ts in the Picture Window . . . . . . . . . . . . . . . . . . . . . . 449 Annotating Sound Files (Praat TextGrids) 4410 Using Log Files 4911 Scripting in Praat 5011.1 What is Praat scripting? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5011.1.1 Praats scripting tutorials . .
20、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5211.1.2 Praat scripts vs. Editor scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . 5211.2 Working with Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5311.2.1 Opening and running a Praat script .
21、 . . . . . . . . . . . . . . . . . . . . . . 5311.2.2 Making (and removing) Menu Shortcuts for scripts . . . . . . . . . . . . . . 5411.3 Creating a new script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5611.3.1 Using other text editors . . . . . . . . . . . . . . . .
22、. . . . . . . . . . . . . . . 5611.3.2 Filenames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5711.3.3 How to magically write a Praat script (using the Praat “history“ function) 5711.3.4 Writing your first single-command script . . . . . . . . . . . . . . . . . . . .
23、 59311.3.5 Scripts with Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6011.4 About the Praat Scripting Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6211.4.1 for loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6211.4.
24、2 if statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6311.4.3 Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6411.4.4 Commented lines (#) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6611.4.5 Useful ti
25、ps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6711.4.6 Everything Else . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6811.5 In defense of Code Cannibalism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6811.6 Closing Remarks o
26、n Praat scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691 Version History1.3.6 - October 2, 2013 - Added discussion of the smoothing of the intensity line and itsrelation to the pitch track in Praat.1.3.5 - March 22, 2013 - Updated License for the Manual. A few typoes squashed.1.
27、3 - September 28th, 2012 - Added Section 7.7, Manipulating Duration with explana-tions of how to slow and speed sound files1.2.5 - August 10th, 2012 - Added discussion of Praat Picture for more complex displays1.2 - May 19th, 2012 - A few small tweaks, added a section on measuring Voice OnsetTime1.1
28、.1 - January 2nd, 2012 - A few other small corrections based on Paul Boersmasfeedback.1.1 - January 1st, 2012 - Updated with Paul Boersmas valuable feedback and a varietyof small corrections.1.0.2 - July 14th, 2011 - Removed some typoes and fixed other small issues.1.0.1 - July 10th, 2011 - Updated
29、to include instructions on removing scripts from But-tons.1.0 - July 10th, 2011 - Version created for LSA Institute Workshop on Praat.42 IntroductionPraat is a wonderful software package written and maintained by Paul Boersma and DavidWeenink of the University of Amsterdam. Available for free, with
30、open source code, there issimply no better package for linguists to use in analyzing speech.Unfortunately, much of the existing documentation for the software is just that, software docu-mentation, and is not designed to help linguists (who may not necessarily consider themselvesto be “phoneticians“
31、 or have a strong phonetics background) get the measurements and makethe changes that they need and desire for their research.As such, rather than introducing each menu item and function as such, Ive instead chosento describe how to do some of the tasks that linguists want to do without assuming a s
32、trongphonetics or programming background. Then, eventually, well discuss some of the more com-plicated measures and tricks one can perform with Praat.Of course, no one workshop can discuss the myriad of features present in Praat, nor cover allof the quirks of the package, but this workshop will hope
33、fully leave you feeling more at homein Praat, and give you an opportunity to go forth and explore further on your own.2.1 VersionsThis guide will assume that you are using a relatively recent build of Praat (5.2+), and theresno reason not to download the latest version whenever released. All screens
34、hots will be fromPraat 5.2.27 running on Mac OS X, but your copy on your platform should not differ signifi-cantly. Unless otherwise specified, workflows for making measurements and manipulations donot differ significantly across platforms.2.2 Other ResourcesAlthough this guide aims to be painfully
35、comprehensive, there are many other resources avail-able for helping with Praat. The first step for dealing with any issue is Praats built in helpguide, accessible from the upper right corner of most windows in the program. Youll be bestserved by starting with “Intro“ and moving from there.There are
36、 also a variety of tutorials for Praat available online, and the Yahoo! Groups “Praat-users“ group, whose archives can be searched at the below link:http:/ Getting and Installing PraatPraat can be downloaded from http:/www.praat.org, and its installation will vary depend-ing on your platform.Mac OS
37、X - Just drag Praat into your Applications folder.Windows (XP, Vista, 7) - Download the installer and run it, and a link to the programwill be placed on your desktop.Linux - If youre running Linux, youll be able to figure out the install on your own.Many distributions have Praat as an installable pa
38、ckage in their repositories, but checkthe version numbers, as you wont want anything older than 5.2.x.3 About Praat3.1 Praat WindowsOnce youve opened Praat, a variety of windows will open automatically, and there are manyother windows which will pop up when using the software. Its best to discuss th
39、ese now sowe can refer to them by name later when discussing the path to certain commands.The Praat Objects window (Figure 1) is where youll start most workflows, using this menuto open, create and save files, as well as to open the various editors and queries which youllneed to work with sound file
40、s.The Editor window (Figure 2) is where youll spend most of your time, and can be accessedby selecting a sound and choosing “View & Edit“. When examining a sound file, the editorwindow will show the sounds waveform on the top and a spectrogram on the bottom, andthe cursor will allow you to take sele
41、ctions and measurements. The menus along the top willallow you to show and hide different bits of information (formants, pitch, intensity), as well asto make more detailed queries. When working with other types of Praat objects (e.g. spectra),the editor window will allow you to query those objects a
42、s well.When you make a query, either in the editor window or from the objects window, the InfoWindow will pop up with your results. You can also print to this window when scripting inPraat (see Section 11). Note that information printed here will not necessarily be saved, andrunning a new query will
43、 overwrite it by default.The Praat Picture window (shown towards the end of the document in Figure 10) is usedto create and display publication-quality images, and is open by default when you start theprogram. For detailed information about using the Pictures window and why it exists at all,see Sect
44、ion 8.6Figure 1: The Praat Objects Window7Knowing the names of all these commands allow us to more easily describe the commandsto use when working with Praat. For instance, if this guide says that you get the duration ofa sound by using Objects ! Query ! Query Time Domain ! Get Total Duration, that
45、means,roughly, “Go to the Objects window, Choose “Query“, then from that submenu choose “QueryTime Domain“, then “Get Total Duration“.4 Recording SoundsTo record sound using Praat, youll want to plug in your microphone, sound card, or externalADC (Analog-Digital Conversion) box to your computer befo
46、re starting Praat, and then.Objects ! New ! Record MonoThis will pull up a recording menu which allows you to choose a sampling frequency (the de-fault, 44100 Hz, is fine for most purposes), a microphone or other sound source, and whetherto record a mono or stereo sound. Press Record to record, and
47、Stop to stop, being carefulthat the sound level bar stays within the “green“ range to avoid clipping. Once youve made arecording, name it and choose Save to list, and it will now show up in the Praat objects windowwhere its ready for editing.If you dont see a green bar (indicating that Praat hears y
48、ou) while you are recording, trychanging the Input source on the left side of the SoundRecorder window. If this doesnt help,go to the computers sound control panel to ensure the proper microphone is selected, and thatthe input volume is not turned way down.Praat only records in one minute long chunk
49、s out of the box. To record longer sounds, youcan either change the buffer size in Praat ! Preferences ! Sound Recording Preferences oryou can use Audacity (free, available from http:/ to recordthe session and then import the sounds into Praat (see Section 5) afterwards for analysis andmanipulation.5 Opening and Saving Files5.1 Opening FilesIf you already have a sound file recorded that youd like to open (recorded in .aiff, .wav or .flacformat), there are two ways to open it in Praat. If you