AutoRPT is a Python command-line tool designed to automatically annotate prosodic features following the Rapid Prosody Transcription (RPT) protocol. It is currently trained on Standard American English (SAE), with future updates planned to include other language varieties.
This project is being developed by a team of undergraduate and graduate students, led by PI Associate Professor Jonathan Howell at Montclair State University. It is produced in conjunction with research funded by NSF grant 2316030, focusing on identifying the prosodic features of “Three Varieties of English in NJ”. The tool is designed to streamline the annotation of prosodic events using Rapid Prosodic Transcription (RPT), as outlined by Cole et al. (2017).
The currently maintained AutoRPT is found at Howell-Prosody-Lab/AutoRPT and is an LSTM. This is an archive of the original Recurrent Neural Network framwork, which is more focused on the automatic annotation of prosodic events. The LSTM framework is more focused on the bootstrapping of annotations so that they can be reviewed by human annotators.
- Ensure that you have Python version 3.7 or higher. You can download the latest version of Python here.
- Download and unzip a copy of the repo.
- It is recommended to create a virtual environment to manage the dependencies specific to AutoRPT.
Setting up a virtual environment ensures that package installations for AutoRPT do not interfere with other Python projects on your machine. Use the command line/terminal to run the following script:
python -m venv AutoRPT
AutoRPT\Scripts\activatepython3 -m venv AutoRPT
source AutoRPT/bin/activateNavigate to the directory containing the AutoRPT folder (this may be in your Downloads unless you have since moved it). Navigate into the AutoRPT-main\AutoRPT-main folder (you should be able to see requirements.txt when you open the folder in the system explorer or use DIR).
You can install the required dependencies by running:
pip install -r requirements.txtThis command will install all the necessary Python packages listed in the requirements.txt file.
The key dependencies for AutoRPT are:
- Praat-ParselMouth: A Python interface to Praat for conducting phonetic analyses.
- TextGrid: A library used to handle Praat TextGrid objects for annotating speech.
- Scikit-learn: A widely-used library for machine learning tasks such as classification and regression.
- Pandas: A powerful data manipulation and analysis library.
- PyTorch: An open-source deep learning framework, used for building and training machine learning models.
Install the SpacY model pipeline.
python -m spacy download en_core_web_smNavigate into the folder with the main file. e.g.
cd AutoRPT-main/AutoRPT-main/AutoRPTExample of how to call the tool:
The example path is in green. Start typing after the >.
- Remember to include 'python' before calling the AutoRPT.py file (This is highlighted in Light Blue in the image) ** All parameters are highlighted yellow in the image ** All manually entered file paths are highlighted orange in the image
- Enter --textgrid and then inside either "" or '' include the path to the desired Textgrid file
- Enter --wav and then inside either "" or '' include the path to the desired wav file
- Enter --tier and then inside either "" or '' include the name of the target tier from the Textgrid file In the general folder of AutoRPT there will be Pitch and Intensity CSVs, feel free to delete these as they are no longer of use.
Within the csv_outputs folder there will be 3 files (per Wav/Textgrid run). These are CSVs that contain the predictions of the model.
Within the tg_outputs folder there will be 3 files (per Wav/Textgrid run). These are Textgrids that contain the predictions of the model.
Step by Step CMD Example
C:\YourFilePath>cd AutoRPT C:\YourFilePath\AutoRPT>python AutoRPT.py --textgrid "YourTextgridFile.TextGrid" --wav "YourWavFile.wav" --tier "YourTierName"