reaper | R Documentation |
Robust Epoch And Pitch EstimatoR (REAPER) algorithm
\insertCitetalkin2019reapersuperassp uses an EpochTracker class to
simultaneously estimate the location of voiced-speech "epochs" or glottal
closure instants (GCI), voicing state (voiced or unvoiced) and fundamental
frequency (F0 or "pitch"). The local (instantaneous) f0 is defined as the
inverse of the time between successive GCI. This function returns the f0 and
normalized CGI cross-correlation in each windowed windowShift
(ms) portion
of the signal.
reaper(
listOfFiles,
beginTime = 0,
endTime = 0,
windowShift = 5,
minF = 40,
maxF = 500,
unvoiced_cost = 0.9,
high.pass = TRUE,
hilbert.transform = FALSE,
explicitExt = "rp0",
outputDirectory = NULL,
toFile = TRUE,
conda.env = NULL
)
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. |
unvoiced_cost |
Set the cost for unvoiced segments. Default is 0.9, the higher the value the more f0 estimates in noise. |
high.pass |
Perform high-pass filtering to remove DC and low-frequency noise? |
hilbert.transform |
Remove phase distortion using Hilbert transform? |
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 |
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. Defaults to |
DC bias and low-frequency noise are removed by high-pass filtering, and the signal is converted to floating point. If the input is known to have phase distortion that is impacting tracker performance, a Hilbert transform, optionally done at this point, may improve performance.
The function uses the python library pyreaper
combined with the R
package reticulate to compute the tracks, and the user therefore has to
make sure that pyreaper
and python is available on the machine. It is
recommended to set up an anaconda ("conda") environment for the superassp
library, like this:
conda create conda create --prefix -n pysuperassp python=3.8 conda activate pysuperassp pip install librosa pip install pyreaper #Not used by this function but by other functions in this package pip install pysptk
An SSFF track object containing two tracks (f0 and corr) that are either returned (toFile == FALSE) or stored on disk.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.