When you run an experiment, you typically have to deal with different data frames (e.g., personal information, variables of interest, actual responses etc.). The idea behind this script is to combine these frames into an output that is ready for analysis. In other words, each participant will have a single csv file, and the only thing you’ll have to do is ‘stitch’ them together.

Last updated: August 05, 2022

What the script does

The script below (autoPraat) does four things:

  1. Collects personal information of a given participant
  2. Runs a judgement experiment, i.e., ooTextFile (ExperimentMFC)
  3. Reads a csv file containing the linguistic variables of interest
  4. Combines 1-3 above into a single csv table ready for analysis

Each participant will have a csv file, which is saved in a folder (output/). You can later easily bind all csvs together (using dplyr in R, for example).


To run this script you’ll need:

A. An ooTextFile experiment file (*.txt)
B. A csv file with your linguistic variables

Finally, you’ll probably want to change the paths in the script. The script assumes (A) and (B) above are in the same directory as the script itself. A folder (output) is also assumed to be present. The script does not use the createDirectory command on Praat, so you can run the exact same script for every participant.

Important: One of the fields in the questionnaire can be used to identify each participant (username). Note that if you repeat the username, Praat will overwrite the file. So just make sure to assign unique usernames.

How to cite

    author = {Garcia, Guilherme Duarte},
    year = {2019},
    howpublished = {Script available at \url{http://guilhermegarcia.github.io/praatExperiment.html}},
    title = {{\tt{autoPraat}}: Automating Praat experiments}}


You can download the script autoPraat.praat here. To view the code, click below.


I suggest checking UTF-8 in Praat’s Text writing preferences....

Copyright © 2022 Guilherme Duarte Garcia