Skip to contents

Decodes FLAC to a temporary WAV internally when needed. Returned object is always a standard tuneR::Wave S4 object usable by seewave and soundecology.

Usage

pam_read_audio(path, from = NULL, to = NULL)

Arguments

path

Character. Audio file path.

from

Numeric. Optional start time in seconds.

to

Numeric. Optional end time in seconds.

Value

A tuneR::Wave S4 object.

Examples

ex <- pam_example_project()
w <- pam_read_audio(ex$files[1], from = 0.5, to = 1.5)
length(w@left) / w@samp.rate   # seconds read
#> [1] 1