Brief intro to Praat

Here are a few Praat Scripts that I have written. Praat scripting is fairly simple, and can really improve the praat experience in two ways:

  1. Make your workflow faster by automating repetitive tasks
  2. Make your results more consistent by automating tasks

Here a few tips to getting started with Praat scripting:

Example Scripts

These scripts are provided without warranty. I have tried to insert comments where appropriate, so hopefully they should be relatively easy to use. If you find any mistakes or bugs, or if you make any improvements, I would very much like to know. Please contact me at robfelty æ umich.edu

To download one script, right-click on the script name. You can also download all the scripts (along with a few helper files) as a .zip or .tar.bz2 file.

FricFilter.praat
## This script performs a filter on a highlighted section of a sound object.  
## The intended use is to make intervocalic consonants sound like coda consonants.
## For fricatives, the filter created starts at the midpoint of the fricative,
## at the average intensity of the fricative, and scales it down to zero 
## intensity with a linear (dB) function.
      
VowelMeasurements.praat
## This script is to be used for measuring vowels.  It takes a highlighted
## section of a sound object (which should be the vowel, as determined by the 
## pitch tracker), and takes the following measurements:
## duration
## F1, F2, F3 in a 30ms window centered on the midpoint of the vowel
## Peak and average intensity
## Initial, Final, Peak, and average pitch
## It uses Praat's default settings for formant and pitch analysis
    
VowelMeasurements2.praat
## This script is to be used for measuring vowels.  It takes a highlighted
## section of a sound object (which should be the vowel, as determined by the 
## pitch tracker), and takes the following measurements:
## duration
## F1, F2, F3 in a 30ms window centered on the midpoint of the vowel
## Peak and average intensity
## Initial, Final, Peak, and average pitch
## It uses whatever pitch and formant settings the user currently has set
    
VowelMeasurements3.praat
## This script is to be used for measuring vowels.  It takes a highlighted
## section of a sound object (which should be the vowel, as determined by the 
## pitch tracker), and takes the following measurements:
## duration
## F1, F2, F3 in a 30ms window centered on the midpoint of the vowel
## Peak and average intensity
## Initial, Final, Peak, and average pitch
## It uses whatever pitch and formant settings the user currently has set
## and then resets the formant and pitch analysis settings to Praat's default 
    
WriteHeader.praat
## this script simply writes a header line to the info window to be used with 
## the VowelMeasurements script
      
automateRecording.praat
## this script reads in a wordlist, in a one stimulus per line textfile, 
## and prompts a speaker to speak each word in a carrier phrase
## "say X again", it records for X seconds, then writes the sound to a file 
## named according to the stimulus, plus an integer from 1 to i, which 
## represents the repition number.
      
evaluateMeasures.praat
## this script displays measurements taken in Praat
## For example, say you have used the VowelMeasurements script to make some 
## measurements, and you have the results in a tab delimited file. This script
## will open up each soundfile and display the measurements taken in a textgrid
## window, allowing one to easily double-check the measurements, and make any
## adjustments if necessary. The adjusted measurements will be written out to a
## separate file
      
makePictures.praat
## this script loops over a directory which contain all sound files,
## and for each file, it opens it up, makes a spectrogram, and allows
## the user to annotate it with a text grid, and the annotation is displayed 
## with the spectrogram along with the intensity contour and a pitch contour
## currently, the picture is simply copied to the clipboard, but it could also 
## be written to an .eps file, or the textgrid could be written to a text grid 
## file, to be used for later processing
    
makeStimuli.praat
## this script accomplishes two tasks - 
##  1. cut stimulus from carrier phrase and append silence
##     then write to .wav file
##  2. make some basic measurements on the vowel
## The first part requires the user to highlight the portion of the sound file
## which contains the stimulus
## The second part requires the user to highlight only the vowel portion 
    
makeStimuliFast.praat
## this script accomplishes two tasks - 
##  1. cut stimulus from carrier phrase and append silence
##      then write to .wav file
##  2. get midpoint of vowel
## The first part requires the user to highlight the portion of the sound file
## which contains the stimulus
## The second part requires the user to highlight only the vowel portion 
## The script loops over a directory containing .wav files, opens each one
## displays it in a textgrid, then asks the user to select a portion of the 
## sound to be cut out, and then to select the vowel, and it marks the midpoint
## of the vowel. We used this script to edit stimuli for a perceptual experiment
    
plotPBvowels.praat
## This script plots PB canonical vowels for comparison with measured
## vowels
    
last modified Tuesday, 02-Sep-2008 18:24:56 EDT