PRAAT SCRIPTS

Here are some Praat scripts that I've written or modified:

Concatenate sound triads from tableThis script concatenates groups of three sound files with pauses according to rows of file names in a tab-separated text file. Each sound triad should have the three sound file names (minus .wav) specified in order in the first three columns, with the name given to the concatenated sound file in the fourth column. Make sure to include a header for each column, since Praat reads in the first row of a table as the header. Pause duration is specified in seconds by the user. This is useful for creating stimuli for ABX or oddity experiments, particularly for jsPsych.

Concatenate sound pairs from tableThis script concatenates pairs of sound files with a pause between according to rows of file names in a tab-separated text file. Each sound pair should have the two sound file names (minus .wav) specified in order in the first two columns, with the name given to the concatenated sound file in the third column. Make sure to include a header for each column, since Praat reads in the first row of a table as the header. Pause duration is specified in seconds by the user. This is useful for creating stimuli for AX experiments, particularly for jsPsych.

Make pairs of identical sounds with pauseThis script reads in all files in a folder and concatenates each one with itself with a pause in between. An optional prefix for concatenated files and the pause duration in seconds are specified by the user. This can be helpful if you want all of your stimuli to be played twice during a trial. For example, we have used this script to create stimuli for an auditory word familiarity task.

Move left boundary of labeled intervals to the right and zero cross final boundariesThis script moves the left boundary of labeled intervals to the right (later in the sound file) by a specified duration in milliseconds and moves the final left and right boundaries to the closest zero crossings. This is helpful when, like me, you use the script that moves the left boundaries to the left and then realize you forgot to label certain stimuli, so you want to undo it.

Add silence to the end of all sound files in a folderThis script adds a specified amount of silence to the end of every sound file in a folder. The resulting sound files are saved with their original names to a folder specified by the user. We have used this script to add silence to stimuli we were presenting in Qualtrics, since this software sometimes clips the end of sound files.

Get F1 to F4 at 7 times points for all labeled intervalsThis script extracts measurements for F1, F2, F3, and F4 at 7 equidistant times points (25%, 37.5%, 50%, 62.5%, 75%, 87.5%, and 100%) in all labeled intervals. It processes all labeled intervals for all sound files in a folder, and outputs a text file. Each sound file and its corresponding TextGrid should have the same name.

Save labeled intervals to WAV filesThis script saves each interval in the selected interval tier of a TextGrid to a separate WAV sound file. The source sound must be opened as a LongSound object, and both the TextGrid and the LongSound must have identical names and they have to be selected in the Objects window before running the script. The original script is by Mietta Lennes and I have modified it only slightly so that it automatically ignores all empty intervals, intervals with a space, or intervals with a line break, because otherwise I was always having to find and delete extraneous spaces or line breaks in otherwise empty labels before the script would run all the way through.