Please note that new versions of the Praat scripts on this page, as well as completely new scripts are available on my updated Praat scripts post.
A treasure trove of Praat scripts
Opening a large number of files in Praat is a tedious and time consuming process. Praat does not allow you to select all of the files in a directory and read them in at the same time. You can only read in one file at a time :(
Thankfully, Praat scripts can take care of many repetitive actions for you. Praat scripts are not magical. They don't do all of the work for you. Think of it this way: a script can carry out any Praat command that you can, which can save you many mouse clicks. A script cannot do anything that requires human judgment, such as labeling segments. When using a script, you have to know exactly what it is doing.
Here are the Praat scripts that I have used:
1. textgrid-maker.praat - This script is used when creating text grids. It will read in all of the .wav files in a folder one at a time, create a text grid, and open the editor for you. Once you have labeled the segments, click the Continue button. The text grid will be saved and the editor will close. Then the next .wav file and text grid will open in the editor. This cycle will continue until you run out of .wav files.
2. textgrid-reviewer.praat - This script is used when checking or modifying existing text grids. It will read in all of the .wav files and text grids in a folder, and open them one at a time in the editor. When you have finished making changes to your labels, click Continue. The script will stop running when you run out of .wav files and text grids.
3. duration-logger.praat - Will output all of the durations of labeled segments to a text file.
4. segment-start-end-duration-dB.praat - As the name suggests, this script will output the start, end, duration and average loudness (in dB) of labeled segments to a text file.
5. xlang_measurements.praat - This script is an extended version of segment-start-end-duration-dB.praat, and will measure formants, f0, and amplitude at 3 points in the vowel (25%, 50%, and 75%).
6. target-chopper.praat - Will chop out your target word/segments, apply onramping for 10ms and offramping for 20ms (to fade your sound file in and out smoothly - without audible clipping), and create a new set of .wav files containing the target only. This script would be used when you are generating stimuli for a perceptual experiment.
For more Praat scripts, I refer you to Katherine Crosswhite's excellent Praat script page.
Praat syntax highlighting for Notepad++
The first time you see a Praat script, you may feel the urge to rip your hair out by the roots in despair. Don't worry. A little colour goes a long way.
Syntax highlighting changes the colour and font of sections of text to improve readability. It is a common feature in advanced text editors such as Notepad++. It is easy to find syntax highlighting for HTML or programming languages, or even Matlab, but syntax highlighting for Praat is a different story. This is because not many people around the world use Praat (certainly not many non-Dutch-non-Linux users).
I know of three text editors that have Praat syntax highlighting:
1. Ultra Edit - which costs $US50
2. TextPad - which costs $US30
3. Emacs - which is horrible (sorry Christian, but it is).
So, I have created a Praat syntax highlighting file scheme for the excellent (and free) Notepad++. You will need to:
1. install Notepad++
2. download the Praat syntax highlighting scheme
3. save the userDefineLang.xml file to C:\Documents and Settings\InsertYourUserNameHere\Application Data\Notepad++\
.praat and .script files will automatically open with Praat syntax highlighting in Notepad++. You can apply syntax highlighting to any file manually by selecting the syntax scheme from the Languages menu within Notepad++.
By downloading and using my Praat syntax highlighting scheme, you agree to become a beta tester :) So, if you notice any problems or inconsistencies in the Praat syntax highlighting, please post a comment below so that I can improve the consistency of the colouring.
Praat auto-completion for Notepad++
Autocomplete is a feature where the program predicts a word or phrase that the user wants to type in without them actually having typed it in completely. In Notepad++, the autocomplete list box is displayed using Ctrl+Space. The list is sorted alphabetically, and filters suggestions as you type. For example, if you type re and then press Ctrl+Space, only words beginning with re will be suggested.
I have converted a Praat autocomplete file that was originally designed for the powerful, but expensive, Ultra Edit, so that it is compatible with (the also excellent but free) Notepad++. You will need to:
1. install Notepad++ (if you haven't already done so)
2. Download the Praat autocomplete file
3. save the praat.api file to C:\ProgramFiles\Notepad++\plugins\APIs\
Note: this is the folder where you installed Notepad++. This is different to where the syntax highlighting file is stored.
Please communicate with me by posting a comment below, rather than emailing me. This way, others can refer to my answers here, saving me many hours of responding to similar emails.
Blogged with Flock