4
$\begingroup$

I would like to ask if I could retrieve information, such as sample rate, bit rate, length of file, and stereo/mono layout, from multiple .wav files at a time in R, from a file list for example? Most packages only allow me process single sound files. Thank you!

$\endgroup$

1 Answer 1

3
$\begingroup$

you can do that with the package warbleR. The code below saves a couple of sound files (for the sake of the example) and gives you the info you want in a data frame:

library(warbleR)

data(list = c("Phae.long1", "Phae.long2"))

writeWave(Phae.long1, file.path(tempdir(), "Phae.long1.wav"))

writeWave(Phae.long2, file.path(tempdir(), "Phae.long2.wav"))

info_sound_files(path = tempdir())

Cheers

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.