Skip to content

This is a script that I did to help my partner analyse over 10000 files generated by PRAAT to do statistical analysis

Notifications You must be signed in to change notification settings

Captnlink/praat-aggregator-csv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PRAAT file aggregator

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.

Installation

Install dependencies

Depending on your OS, do these following steps to install the required software dependencies.

MacOS systems

brew install python

Linux Systems (Debian)

sudo apt get install python

Windows System

Install the script

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.git

How to update

Ouvrir un nouveau terminal avec VSCode

git fetch
git pull

If 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/main

If you do mind, please learn how to perform git operations. You can navigate to Learn Git online

How to use

How to open the script

Prepare the Data files structure

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
        └── ...

Executing the script

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_algorithm

The possible algorithms are:

  • normtimef0
  • normtime_f0acceleration
  • normtime_f0velocity
  • normtime_semitonef0

Generated files

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

About

This is a script that I did to help my partner analyse over 10000 files generated by PRAAT to do statistical analysis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages