Automating Praat experiments
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: March 2024
What the script does
The script below (autoPraat
) does four things (Garcia, 2019):
- Collects personal information of a given participant
- Runs a judgement experiment, i.e.,
ooTextFile
(ExperimentMFC) - Reads a
csv
file containing the linguistic variables of interest - 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 csv
s 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
Both A and B must have the same order of stimuli
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.
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 username
s.
Script
You can download the script autoPraat.praat
here.
I suggest checking UTF-8
in Praat’s Text writing preferences...
.
Copyright © 2024 Guilherme Duarte Garcia
References
autoPraat
: Automating praat experiments. Praat script available at https://gdgarcia.ca/praatExperiment.html.