Praat script resources
Page contents
How to use this page
Directory of scripts by type and description
Links: other online collections of Praat scripts
How to use this page
How to run a script
Scripts save Praat users time and effort by automating a sequence of operations. To run a Praat script, go to the Control menu in the Praat objects window and select New Praat script.
Then pull up the code for the desired script by clicking on one of the
links below. Copy all the code there (e.g. highlight and Ctrl-C on a PC) and paste it into the new untitled script window. Finally, select Run > Run (or type Ctrl-R) in the untitled script window to execute the script.
How to save a script or add it to the menu
In the open untitled script window with the new script pasted in the text box, go to the File menu to Save the script to a convenient location. The Add to fixed menu... command under File can be used to add the current script to one of the head menus in the Praat objects window. Menus can be edited (e.g. to remove previously added scripts) by going to Control > Preferences > Buttons and clicking on the desired command.
How to script in Praat
See the Scripting tutorial under Help in Praat objects or try any of the many online tutorials.
Praat script directory by type and description
Directory categories
Sound file management
Text grid management
Analysis of sounds using text grids
Segmentation and extraction
Drawing pictures
Noise and speech manipulation
More sound analysis
Sound file management
- get-files (Kevin Ryan)
Open multiple files from the specified directory at once.
- get-files-from-list (Bert Remijsen, back up here)
Open multiple files enumerated in a list in the specified text file (BR's description).
- remove-all (Kevin Ryan)
Remove all objects from object list.
- change-sample-rate-or-format (Mietta Lennes, back up here)
Resample and/or change the format of a set of sound files (ML's description).
- concatenate-sounds (Chad Vicenik)
Concatenate (daisy-chain) two or more selected Sound objects into one Sound object.
- duplicate-sound (Chad Vicenik)
Concatenate (daisy-chain) a Sound object with itself the specified number of times.
- combine-sounds (Chris Darwin, back up here)
Combine (merge) two Sounds with specified gains.
- script-installation-script (Niels Petersen)
An example of a script used to install several scripts to the Praat menus.
- wave-maker (Kevin Ryan)
Create multiple varied sine waves at once in the object list and/or a directory (useful for testing scripts).
Text grid management
Analysis of sounds using text grids
- calculate-segment-durations (Mietta Lennes, back up here)
Log durations between labeled markers in a set of text grids. (ML's description).
- startpoint-logger (Mietta Lennes, back up here)
Similar to the above script, but make file with startpoint of each labeled interval (ML's description).
- formant-logger (Katherine Crosswhite)
Log midpoint F0-F3 and duration of vowels delimited by labeled markers in a set of text grids (KC's description).
- formant-logger (Mietta Lennes, back up here)
Log midpoint F1-F3 of text grid labeled intervals for a set of Sound/TextGrid pairs (ML's description).
- For F1/F2 logging, see also Bert Remijsen's scripts for using either the point tier or the interval tier to mark vowels.
- draw-formant-chart (Mietta Lennes, back up here)
Reports and logs midpoint F1-F2 of vowels delimited by labeled markers in a set of text grids (ML's description).
- log-pitch-maxima (Mietta Lennes, back up here)
Get F0 maxima of all text grid labeled intervals for a number of Sound-TextGrid pairs (ML's description).
- log-f0-extrema-using-momel (Bert Remijsen et al., back up here)
Use the MOMEL (Hirst & Espesser) algorithm to log pitch turning points to TextGrid (BR's description).
- phonation-measurements (Chad Vicenik)
Makes various measurements, including H1-H2, H1-A1, H1-A2, and H1-A3.
Segmentation and extraction
Drawing pictures
- draw-sample-figure (Hugo Quené, back up here)
Demonstrates how to draw a figure (graph) using a script (HQ's scripts).
- Functional phonology, Paul Boersma's 1998 dissertation, has a number of sophisticated figure drawing scripts,
- draw-distribution-bar (Mietta Lennes, back up here)
Draw a makeshift bar showing distribution of labeled intervals from a file of timepoint, label pairs (ML's description).
- draw-source-filter-model (Niels Petersen)
Draw the components of the source-filter model of vowel production to the Picture window.
- draw-formant-point-to-bark-chart (possibly buggy; Mietta Lennes, back up here)
Draw a one-Bark vowel circle from given formant values (Hz) on a Bark-scale F1/F2 chart.
- make-matrix-of-plots (Chris Darwin, back up here)
Create a matrix of plots; format these plots by changing the script code (try it with the defaults).
Noise and speech manipulation
- flat-intonation-resynthesizer (Chad Vicenik)
Resynthesizes all files in a directory to have flat pitch of a given frequency.
- adjust-intensity (Katherine Crosswhite)
Scale a set of sounds so that their peak amplitudes are identical (KC's description).
- intensity-scaler (Chad Vicenik)
Scales the intensity of all files in a directory to the same value.
- intensity-neutralizer (Chad Vicenik)
Flattens the intensity curve of all files in a directory.
- file-resampler (Chad Vicenik)
Resamples all the files in a directory.
- low-pass-filter (Chad Vicenik)
Low-pass filters all files in a directory.
- create-sustained-vowel (Niels Petersen)
Create a sustained vowel of the specified type using the LF source model.
- create-waveforms (Niels Petersen)
Create various kinds of waveforms (sawtooth, square, sine, white noise, pink noise, etc.).
- comb-filter-noise (Chris Darwin, back up here)
Generate and comb-filter white noise.
- shannon-am-noise (Chris Darwin, back up here)
Produce Shannon-type AM noise from a selected Sound file using four bands.
- vocal-tract-change (Chris Darwin, back up here)
Change size of vocal tract (formants, but not duration/pitch); cf. vocal-tract-change-dynamic, which leaves the F0 altered.
- sine-wave-speech (Chris Darwin, back up here)
Create three-formant sine-wave speech using selected Sound object.
- metronome (Hugo Quené, back up here)
Simple one-beat metronome; see HQ's scripts page for several more complex metronomes.
- Careful:
the default durations are very long; they should be set shorter before
testing, lest Praat be tied up for minutes. Also, references to
mywhoosh.wav should be changed to some extant WAV or removed.
More sound analysis
- amplitude-gating (Niels Petersen)
Gates the selected Sound object in and out (in intensity) using specified rise and fall times.
- voice-report (Niels Petersen)
Generate a customized “voice report” for the selected Sound.
- adjust-f0-and-duration (Chris Darwin, back up here)
Globally alter fundamental frequency and/or duration of all selected Sound objects.
- mark-vowel-onsets (Hugo Quené, back up here)
Find the vowel onsets in a selected Sound and log their timepoints in a new PointProcess; can then use HQ's write-pp (back up here) to record the PointProcess timepoints in a data file (HQ's scripts).
- draw-fft-spectrum (Mietta Lennes, back up here)
Draw and save FFT spectrum for 40 ms window around cursor; run from sound editor (ML's description).
- draw-lpc-spectrum (Mietta Lennes, back up here)
Like draw-fft-spectrum above, but LPC spectrum.
- create-analysis-table (Setsuko Shirai, back up here)
Create a table showing pitch, intensity, and formants every 10 ms for a set of WAVs (untested).
- pitch-unit-conversion (Niels Petersen)
Convert between different types of units, e.g. Hertz to Semitones, Bark, or Mel.
- annotate-using-manpage (John Tøndering)
Annotate a TextGrid with phonetic symbols using ManPage (see JT's description).
- make-stereo (Chris Darwin, back up here)
Combine selected Sounds to make a stereo Sound file.
- spectral-rotation (Chris Darwin, back up here)
Praat scripts: links and online collections
In no particular order:
- Praat: main Praat website (e.g. download the program).
- Praat users group: Yahoo! discussion group for Praat users; some scripts available in database.
- Mietta Lennes: a large number of scripts, many quite involved, with very informative descriptions.
- Chris Darwin: CD's advanced scripts for e.g. sine-wave speech, Shannon AM-noise speech, resizing vocal tract, etc.
- Paul Boersma: explore links for various highly tailored scripts associated with PB's 1998 dissertation.
- Katherine Crosswhite: the code of the first few scripts is very well documented; good for learning Praat scripting.
- Niels Petersen: 20-some scripts at the bottom.
- Hugo Quené: some neat scripts, including several metronomes.
- Bert Remijsen: some very well explained scripts, with sample input.
- John Tøndering:a “Label.man” (annotate from ManPage) package plus a few other common scripts.
- Joe Toscano: archived scripts, including his own
[This page is infrequently updated. Links are not guaranteed.]
Created 2005 by Kevin Ryan
Updated July 2008 by Pat Keating
Updated August 2009 by Chad Vicenik