Submitting Author Name: Fredrik Nylén
Submitting Author Github Handle: FredrikKarlssonSpeech
Repository: https://github.com/humlab-speech/pladdrr
Version submitted: 5.0.5
Submission type: Standard
Editor: TBD
Reviewers: TBD
Archive: TBD
Version accepted: TBD
Language: en
- Paste the full DESCRIPTION file inside a code block below:
Package: pladdrr
Type: Package
Title: Direct Access to the Core Algorithms of Praat
Version: 5.0.5
Authors@R: c(
person("Fredrik", "Nylén", , "fredrik.nylen@umu.se", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-3373-0934")),
person("Tomas", "Skotare", role = "ctb",
comment = c(ORCID = "0000-0001-8445-0559")),
person("Johan", "von Boer", role = "ctb"),
person("Paul", "Boersma", role = "cph",
comment = "Author of the bundled Praat sources in src/praat.github.io"),
person("David", "Weenink", role = "cph",
comment = "Author of the bundled Praat sources in src/praat.github.io"),
person("Max-Planck-Society", role = "cph",
comment = "Copyright holder of the bundled pocketfft headers in src/pocketfft"),
person("Xiph.Org Foundation", role = "cph",
comment = "Copyright holder of the bundled Vorbis/Ogg and Opusfile sources"),
person("Free Software Foundation", role = "cph",
comment = "Copyright holder of the GNU Scientific Library, linked but not bundled")
)
Description: Provides direct access to Praat C implemented
functionality from R. This package allows R users to leverage
Praat's powerful phonetic analysis capabilities directly from R. The package exposes
39 Praat modules with 500+ methods for sound manipulation, robust formant
tracking (FormantPath, FormantModeler), speech synthesis (KlattGrid), pitch
analysis, intensity measurements, spectral analysis (ComplexSpectrogram),
cepstral coefficients (MFCC, LFCC), statistical analysis (PCA, Discriminant),
auditory modeling (Cochleagram, Excitation), TextGrid annotation, voice
quality assessment, geometric operations (Polygon), and a persistent Praat
script interpreter with bidirectional R-Praat object transfer.
License: GPL-3 + file LICENSE
URL: https://github.com/humlab-speech/pladdrr, https://humlab-speech.github.io/pladdrr/
BugReports: https://github.com/humlab-speech/pladdrr/issues
Encoding: UTF-8
Depends:
R (>= 4.0.0)
Imports:
Rcpp (>= 1.0.0),
R6 (>= 2.5.0),
ggplot2,
rlang,
data.table (>= 1.14.0),
methods,
tools,
utils,
parallel,
grid
LinkingTo: Rcpp, RcppXsimd
Suggests:
testthat (>= 3.0.0),
roxygen2 (>= 7.0.0),
covr,
knitr,
rmarkdown,
gridExtra,
patchwork,
scales,
RcppSimdJson,
RcppXPtrUtils,
av,
bench,
microbenchmark,
speakr,
dplyr,
purrr,
tidyr
SystemRequirements: C++17 compiler (GCC >= 7, Clang >= 5, MSVC >= 2017),
GNU Scientific Library (GSL >= 1.10)
VignetteBuilder: knitr
Config/roxygen2/version: 8.1.0
Config/testthat/edition: 3
Scope
-
Please indicate which category or categories from our package fit policies this package falls under: (Please check an appropriate box below. If you are unsure, we suggest you make a pre-submission inquiry.):
-
Explain how and why the package falls under these categories (briefly, 1-2 sentences):
pladdrr links directly against Praat's C/C++ source through Rcpp, exposing Praat's phonetic analysis algorithms (formant tracking, pitch extraction, voice quality metrics, and more) as R functions and classes, without shelling out to a separate Praat installation.
- Who is the target audience and what are scientific applications of this package?
Speech scientists, (psycho) linguists, phoneticians, and speech and langugage pathologists who currently run acoustic analyses by shell piping their analysis scripts into Praat and want to move that work into a more robust and reproducible R pipeline. Typical use cases of the package are formant and pitch tracking for vowel space and prosody research, voice quality assessment (CPPS, jitter, shimmer, HNR) in clinical and forensic phonetics, and batch acoustic feature extraction for corpus-based speech studies.
Two existing R packages bridge to Praat, PraatR and speakr. Both work by writing a Praat script to disk, shelling out to a separately installed Praat binary, and parsing the text output back into R. This approache requires Praat to be installed and on the system path, is slow for batch work, makes multifile Praat proceedures and parallell workloads cumbersome to work with, and provides weaks support for error handling after handoff to Praat. An additional package privdes a partial implmentation that bridges the interaction between Praat and R by output of (rPraat ). The package 'pladdrr' instead bundles Praat's own C++ source and calls it directly through Rcpp, so no external Praat installation is needed, and results come back as native R objects rather than parsed text files. This also gives access to lower-level Praat objects (e.g. FormantPath, KlattGrid, ComplexSpectrogram) that aren't easily reachable through script-based scripting, and lets long-running operations (e.g. CPPS over many files) run multi-threaded.
In contrast to other solutions, pladdrr also severely broadens the media support compared to that of the Praat applications (which the other R packages rely on for sound IO also) by using the av R package for all media file loading. This serves two purposes, with the primariy being to provide better support for more sound file types without an explicit pre-conversion (which meanst loading, conversion, storage and then reloading the media by the Praat application via the shell) by the package, or ahead of time by the user.
The second purpose was to not in this package duplicate media loading abilities that have been already been made available, and more comprehensively, elsewhere.
pladdrr operates only on audio files and derived acoustic measures supplied by the user. It does not collect, transmit, or store any data itself.
- If you made a pre-submission inquiry, please paste the link to the corresponding issue, forum post, or other discussion, or
@tag the editor you contacted.
- Explain reasons for any
pkgcheck items which your package is unable to pass.
"✖ remove or use internal functions that are defined but never called. Dead code increases
maintenance burden.
R/amplitudetier-wrapper.R:138
R/cepstrum-wrapper.R:73
R/cochleagram-wrapper.R:146
R/complexspectrogram-module.R:76
R/discriminant-wrapper.R:145
... and 124 more lines
"
We see these results as false positives, as what is caught here is our solution to S3 dispatch for class methods of Rcpp modules. This is a core mechanism we have used in the package, and therfore goodpractice flag them frequently.
"✖ write unit tests for all functions, and all package code in general. 91% of code lines are
covered by test cases.
R/as-data-frame-missing.R:107
R/as-data-frame-missing.R:108
R/as-data-frame-missing.R:109
R/as-data-frame-missing.R:111
R/as-data-frame-missing.R:135
... and 489 more lines
"
This is a general comment, that we think means that we do not have 100% test coverage. This is a large package to cover and we suggest that achiving 100% test coverage is high bar to pass for it.
Technical checks
Confirm each of the following by checking the box.
This package:
Use of Generative AI
The pladdrr package encapsulated a large existing C++ code base. Exposure of the algorithms of this code base to users of R has largely been done using several LLMs in the course of 10 months. In a developmental phase, one LLMs has been tasked with exposing the a particular object and associated methods from the Praat code base. The resulting implementation has then been critiqued by another LLM looking for performance issues or opportunities of performance enhancements, or threats to faithfulness in output. Separate LLMs have applied Praat to provide gold standard outputs for methods being developed, en ensure fidelity in output with matching input parameters. The package documentation and pkgdown manual was developed in a similar manner, with human interaction. The effects of the thorough evaluation, with resulting changes in developmental paths / approaches to expose the Praat classes as a results of this interative challenging of a current state of the implementation can be seen in the git log.
We have sucessfully used the pladdrr package to re-implement Praat code. See Lin's Concordance Correlation Coefficient between the output of the pladdrr based re-implmentation to that of the original Praat implementation of algorithms in 166-2374 samples (implementation dependent) not used continuous evaluation of implmentations in the development proces.
| Algorithm |
healthy voice |
pathological voice |
| AVQI |
0.9558 |
0.9973 |
| CPPS |
0.9991 |
0.9997 |
| DSI |
1.0000 |
0.9919 |
| Formant (Burg) |
1.0000 |
1.0000 |
| Intensity |
1.0000 |
1.0000 |
| Pharyngeal tilt |
1.0000 |
0.9769 |
| Pitch (F0) |
0.9998 |
0.9994 |
| PraatSauce |
0.9681 |
0.9764 |
| Spectral moments |
1.0000 |
1.0000 |
| Tremor |
1.0000 |
0.9999 |
| Voice report |
1.0000 |
1.0000 |
| Voice quality |
0.9918 |
0.9960 |
| VUV |
0.9996 |
0.9962 |
| Mean |
0.9934 |
0.9949 |
| ------------------- |
:---------------: |
:----------------: |
We belive therefore that what we have achieved is a valid and reliable exposure of the underlying C code of Praat that would likelly not be feasable to produce by human coders, but also not by LLMs / coding agents alone without human intervention and guidance.
LLMs used: Models from Anthropic, OpenAI, and Mistral were used interchangebly to provide the interactive development and critique of the state of the package.
Publication options
MEE Options
Code of conduct
Submitting Author Name: Fredrik Nylén
Submitting Author Github Handle: FredrikKarlssonSpeech
Repository: https://github.com/humlab-speech/pladdrr
Version submitted: 5.0.5
Submission type: Standard
Editor: TBD
Reviewers: TBD
Archive: TBD
Version accepted: TBD
Language: en
Scope
Please indicate which category or categories from our package fit policies this package falls under: (Please check an appropriate box below. If you are unsure, we suggest you make a pre-submission inquiry.):
Explain how and why the package falls under these categories (briefly, 1-2 sentences):
pladdrr links directly against Praat's C/C++ source through Rcpp, exposing Praat's phonetic analysis algorithms (formant tracking, pitch extraction, voice quality metrics, and more) as R functions and classes, without shelling out to a separate Praat installation.
Speech scientists, (psycho) linguists, phoneticians, and speech and langugage pathologists who currently run acoustic analyses by shell piping their analysis scripts into Praat and want to move that work into a more robust and reproducible R pipeline. Typical use cases of the package are formant and pitch tracking for vowel space and prosody research, voice quality assessment (CPPS, jitter, shimmer, HNR) in clinical and forensic phonetics, and batch acoustic feature extraction for corpus-based speech studies.
Two existing R packages bridge to Praat,
PraatRandspeakr. Both work by writing a Praat script to disk, shelling out to a separately installed Praat binary, and parsing the text output back into R. This approache requires Praat to be installed and on the system path, is slow for batch work, makes multifile Praat proceedures and parallell workloads cumbersome to work with, and provides weaks support for error handling after handoff to Praat. An additional package privdes a partial implmentation that bridges the interaction between Praat and R by output of (rPraat). The package 'pladdrr' instead bundles Praat's own C++ source and calls it directly through Rcpp, so no external Praat installation is needed, and results come back as native R objects rather than parsed text files. This also gives access to lower-level Praat objects (e.g. FormantPath, KlattGrid, ComplexSpectrogram) that aren't easily reachable through script-based scripting, and lets long-running operations (e.g. CPPS over many files) run multi-threaded.In contrast to other solutions, pladdrr also severely broadens the media support compared to that of the Praat applications (which the other R packages rely on for sound IO also) by using the av R package for all media file loading. This serves two purposes, with the primariy being to provide better support for more sound file types without an explicit pre-conversion (which meanst loading, conversion, storage and then reloading the media by the Praat application via the shell) by the package, or ahead of time by the user.
The second purpose was to not in this package duplicate media loading abilities that have been already been made available, and more comprehensively, elsewhere.
pladdrr operates only on audio files and derived acoustic measures supplied by the user. It does not collect, transmit, or store any data itself.
@tagthe editor you contacted.pkgcheckitems which your package is unable to pass."✖ remove or use internal functions that are defined but never called. Dead code increases
maintenance burden.
"
We see these results as false positives, as what is caught here is our solution to S3 dispatch for class methods of Rcpp modules. This is a core mechanism we have used in the package, and therfore goodpractice flag them frequently.
"✖ write unit tests for all functions, and all package code in general. 91% of code lines are
covered by test cases.
"
This is a general comment, that we think means that we do not have 100% test coverage. This is a large package to cover and we suggest that achiving 100% test coverage is high bar to pass for it.
Technical checks
Confirm each of the following by checking the box.
This package:
Use of Generative AI
The pladdrr package encapsulated a large existing C++ code base. Exposure of the algorithms of this code base to users of R has largely been done using several LLMs in the course of 10 months. In a developmental phase, one LLMs has been tasked with exposing the a particular object and associated methods from the Praat code base. The resulting implementation has then been critiqued by another LLM looking for performance issues or opportunities of performance enhancements, or threats to faithfulness in output. Separate LLMs have applied Praat to provide gold standard outputs for methods being developed, en ensure fidelity in output with matching input parameters. The package documentation and pkgdown manual was developed in a similar manner, with human interaction. The effects of the thorough evaluation, with resulting changes in developmental paths / approaches to expose the Praat classes as a results of this interative challenging of a current state of the implementation can be seen in the git log.
We have sucessfully used the pladdrr package to re-implement Praat code. See Lin's Concordance Correlation Coefficient between the output of the pladdrr based re-implmentation to that of the original Praat implementation of algorithms in 166-2374 samples (implementation dependent) not used continuous evaluation of implmentations in the development proces.
We belive therefore that what we have achieved is a valid and reliable exposure of the underlying C code of Praat that would likelly not be feasable to produce by human coders, but also not by LLMs / coding agents alone without human intervention and guidance.
LLMs used: Models from Anthropic, OpenAI, and Mistral were used interchangebly to provide the interactive development and critique of the state of the package.
Publication options
Do you intend for this package to go on CRAN?
Do you intend for this package to go on Bioconductor?
Do you wish to submit an Applications Article about your package to Methods in Ecology and Evolution? If so:
MEE Options
Code of conduct