tsostarics / PitchMendR

Pitch Contour Editor Shiny App
MIT License
3 stars 0 forks source link

PitchMendR

This package provides a shiny app used to modify F0 pitch pulses held in a spreadsheet.

Citation

If you use this software in your research, please cite the following paper:

Sostarics, T., & Cole, J. (2024). PitchMendR: A Tool for the Diagnosis and Treatment of F0 Irregularities. In Proceedings of Speech Prosody 2024.

Bibtex:

@inproceedings{sostarics24speechprosody,
  author={Thomas Sostarics and Jennifer Cole},
  title={{PitchMendR: A Tool for the Diagnosis and Treatment of F0 Irregularities}},
  year=2024,
  booktitle={Proc. Speech Prosody 2024},
  pages={289--293},
  doi={10.21437/SpeechProsody.2024-59}
}

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("tsostarics/PitchMendR")

Usage

You can launch the editor GUI like so:

library(PitchMendR)
openEditor()

Setup page

You will be brought to the Setup page, where the current working directory is shown. The input directory will be automatically set to the directory containing a demo file demo_data.csv. The output directory is set to the current working directory (.) Files in the input directory that you can load are shown in the Files Available dropdown box. Once you select a file from the box, press the big blue Load File button in the top right corner. The app assumes the following columns exist by default, but can be changed in the Settings pane.

These are the default outputs from PraatSauce, which exports a single csv file containing information about multiple processed files. If any of these columns are not found in the dataset, you'll be brought to the Settings page where you can change the column name mappings. Once you've set the column names correctly you can try loading the file again.

Editor pane

There are three main sections, from right to left:

Editor pane buttons

Plot Settings pane inputs/buttons

Additional toggles are available in the retractable sidebar.

As you inspect files, the app wil keep track of which files you've looked at and will move them from the "Unchecked Files" set to the "Checked Files set". You can mark all currently plotted files as checked using the [Check off plotted files] button.

Praat integration

Given a path to a praat executable (on windows) or a praat command (on Mac/Linux), as well as a directory of audio files and (optionally) textgrids, you can send files from PitchMendR to Praat. Simply press the "Send to Praat" button and the currently opened files will be opened in Praat. If you select a region on the plot before pressing the button, when looking at a single file, the selected region will also be sent to Praat, highlighting the same exact region. Note that the X-axis must be on the same scale (i.e., seconds) for this to work properly. You can press the Clear Praat Files button to automatically clear all the files in the objects pane, which is useful after loading a bunch of files.