This script is used to aggregate the output of algorithms generated with PRAAT into a CSV
The scrip will find all files in a directory and its sub-directory that match the algorithm and perform the operation on them.
It reads all files with an extension equal to the chosen_algorithm and transform each of them in a single line of a CSV.
Depending on your OS, do these following steps to install the required software dependencies.
MacOS systems
brew install pythonLinux Systems (Debian)
sudo apt get install pythonWindows System
- Download and install Python
Open a terminal and navigate to the directory you want to install the script.
Clone this repository using this line:
git clone https://github.com/Captnlink/praat-aggregator-csv.gitOuvrir un nouveau terminal avec VSCode
git fetch
git pullIf we have modified the script in some ways, this might not work. If you don't mind losing the changes you've made, you can do the following
git fetch
git reset --hard origin/mainIf you do mind, please learn how to perform git operations. You can navigate to Learn Git online
Each file should be named participantID_sessionName_projectName_SentenceName.algorithm.
Each file should be in a subfolder named after the frequency range of the PRAAT analysis
You should prepare the folder containing the PRAAT data like this:
.
└── PRAAT_data/
└── frequency_range/
└── participantID_sessionName_projectName_SentenceName.algorithm
└── ...
.
└── PRAAT_data/
└── 250-300/
└── p12345_v1_projectX_s1.norntimef0
└── ...
Execute the following command line replacing PATH/TO/DIRECTORY" with the path of the PRAAT file location and chosen_algorithm with the appropriate algorithm.
python praat-aggregator-csv/sources/main.py -d "PATH/TO/DIRECTORY" -a chosen_algorithmThe possible algorithms are:
- normtimef0
- normtime_f0acceleration
- normtime_f0velocity
- normtime_semitonef0
The generated files will be located under praat-aggregator-csv/output
- algorithm_aggregation.csv: The aggregated values of all praat files with target algorithm
- algorithm_participants.json: The count of the number of occurrence of a certain algorithm