rapt: Compute f0 using the RAPT algorithm

raptR Documentation

Compute f0 using the RAPT algorithm

Description

This function takes a sound file and computes f$_0$ and an estimate of pitch using the "A robust algorithm for pitch tracking" (RAPT) algorithm \insertCitetalkin1995robustsuperassp.

Usage

rapt(
  listOfFiles,
  beginTime = 0,
  endTime = 0,
  windowShift = 5,
  minF = 70,
  maxF = 200,
  voicing.threshold = 0.3,
  explicitExt = "swi",
  outputDirectory = NULL,
  toFile = TRUE,
  conda.env = NULL
)

Arguments

listOfFiles

A vector of file paths to wav files.

beginTime

The start time of the section of the sound file that should be processed.

endTime

The end time of the section of the sound file that should be processed.

windowShift

The measurement interval (frame duration), in seconds.

minF

Candidate f0 frequencies below this frequency will not be considered.

maxF

Candidates above this frequency will be ignored.

voicing.threshold

Voice/unvoiced threshold. Default is 0.3.

explicitExt

the file extension that should be used.

outputDirectory

set an explicit directory for where the signal file will be written. If not defined, the file will be written to the same directory as the sound file.

toFile

write the output to a file? The file will be written in outputDirectory, if defined, or in the same directory as the soundfile.

conda.env

The name of the conda environment in which Python and its required packages are stored. Please make sure that you know what you are doing if you change this.

Details

The implementation of RAPT in the Speech Signal Processing Toolkit (SPTK) \insertCitesptkspeechsuperassp is used, and called via its Python interface and the retiulate R package to compute the signal track. Therefore, the user will have to make sure that a python environment is present and can be attached by the reticulate. An anaconda environment is recommended, and can set up by the user by a setup procedure that involve at least these commands:

conda create conda create --prefix -n pysuperassp python=3.8 
conda activate pysuperassp
pip install librosa
pip install pysptk
#Not used by this function but by other functions in this package
pip install pyreaper 

to make the functionality that this function requires available.

Value

An SSFF track object containing two tracks (f0 and pitch) that are either returned (toFile == FALSE) or stored on disk.

References

\insertAllCited

humlab-speech/superassp documentation built on May 8, 2024, 2:27 p.m.