This is a version of getSoundFragments that can have a dataframe of matches piped into it.
Usage
fragmentAudio(
matches,
sample.rate = NULL,
path = "",
no.progress = FALSE,
start.column = Line,
end.column = LineEnd,
labbcat.url = NULL
)
Arguments
- matches
A dataframe returned by getMatches or getAllUtterances, identifying the results to which acoustic measurments should be appended.
- sample.rate
Optional sample rate in Hz - if a positive integer, then the result is a mono file with the given sample rate.
- path
Optional path to directory where the files should be saved.
- no.progress
TRUE to suppress visual progress bar. Otherwise, progress bar will be shown when interactive().
- start.column
The column of
matches
containing the start time in seconds.- end.column
The column of
matches
containing the end time in seconds.- labbcat.url
URL to the LaBB-CAT instance (instead of inferring it from
matches
).
Examples
if (FALSE) { # \dontrun{
## Get all tokens of "the"
the.tokens <- getMatches(labbcat.url, "the")
## Get a 22kHz sample rate wav file for each matched utterance
the.wavs <- the.tokens |> fragmentTranscripts(sample.rate = 22050)
} # }