howto

HOWTO – running scripts to measure fluency automatically

By: Nivja de Jong, July 2020

This document describes how to run two PRAAT-scripts that measure fluency automatically. You need two scripts (see here: scripts)

1) PRAAT script Syllable nuclei v3 (you need this new script, even if you have an old version of this PRAAT script already downloaded)

2) PRAAT script Filled pauses

Step 0: Download PRAAT

from http://www.fon.hum.uva.nl/praat/

NB: you need a new (2020) version of PRAAT (6.1.1.X) if you already have PRAAT on your computer.

Step 1: Save PRAAT-scripts

Open PRAAT. Then for each script separately, copy-paste the script from this page. For each script, start copying from "###" to the bottom of the page. Again for each script separately, choose “Praat - New praat script” in PRAAT (Click on "Praat" top-left, then choose "New Praat script"). Paste the script into the window that opens and save the scripts as "syllablenucleiv3.praat" and "filledpauses.praat", respectively. You now have two PRAAT-scripts in one folder on your computer.

Step 2: run scripts

Run PRAAT script Syllable Nuclei v3: in the PRAAT Objects window, click “Praat – Open PRAAT script” and then browse to the directory where you downloaded the file.


Step 3: Enter values for both scripts

a) First select the input: either a selected sound-file in the PRAAT-objects window, a list of sound files in the PRAAT-objects window, or a “filespec”, e.g. “C:/Allwavfiles/*.wav”. This third option would read and analyze all .wav files in the specified directory.

b) For the script to measure syllable nuclei, you may change the default settings: pre-process the data, change the silence threshold (changing it to -30 from the default -25 will lead to more of the soundfile being categorized as silence, changing it to -20 from the default will lead to more of the soundfile being categorized as speech), change the dip in dB between syllable peaks: lower values (e.g. 2 instead of the default 4) will lead to more peaks detected as syllables, and finally you can change the minimum duration of a silent pause to have shorter silent pauses being detected as silent pauses.

c) For the script to detect filled pauses, check the box "Detect Filled Pauses" and set the language (English or Dutch). If you want, you can change the default threshold to detect filled pauses. A value of 1.2, for instance, will lead to less false positives (i.e. less syllables detected as automatically filled pauses that are in fact regular syllables).

d) Choose where and how to save the output: if you choose to save a .txt-file or a .Table, this will be saved in the folder where you have located the PRAAT-scripts (not where your sounfiles are located if you chose option “filespec”). Also note the option to either append or overwrite such a file if it already exists.

Step 4: wait

Wait until the scripts are both done. This may take a while, especially if you have a folder with quite a few .wav or .flac or .MP3-files. Tip: try out the script first on just a number of files before you run it on a directory with many soundfiles.

Step 5: inspect results

Check the following questions

a) Are the settings to detect sound and silence ok? (Too much speech identified as silence? -> change "Silence threshold (dB)" -25 for instance to -20)

b) Are the settings for detecting syllables ok? (Too many syllables that are actually quite long syllables identified as multiple syllables? -> change "Minimum dip near peak (dB)" from 2 to for instance 4)

c) Is the threshold to detect filled pauses ok? (To much regular syllables detected as filled pauses? -> change "Filled pause threshold" from 1 to for instance 1.2)

You inspect the results by selecting the Soundfile with its corresponding created TextGrid. In the example below, you see the detected sylabel nuclei on the first Tier, the silent pauses are seen on the second tier, where the Phrases (stretches of speech surrounded by silet pauses) are numbered. The silent pauses are the times between the phrases. Finally, the last tier shows all syllables, and syllables automatically categorized as filled pauses are marked there as “fp”.


To check these settings, it is likely necessary to zoom in. For instance, select a phrase, for instance number 8 (click on “8” in the second tier) and then zoom in by clickin on “sel” in the bottom left. You will then see phrase 8 zoomed in (see below).

In this way, you may see whether the settings on the soundfile are approximately working as intended.

Tip

Try out the settings for a number of soundfiles and check the results before you run the scripts on an entire folder with soundfiles. For valid comparison across soundfiles, use the same settings on similar (e.g. with respect to quality, task type, …) types of soundfiles.