Learn R Programming

warbleR (version 1.1.1)

mp32wav: Convert .mp3 files to .wav

Description

mp32wav converts several .mp3 files in working directory to .wav format

Usage

mp32wav(samp.rate = 44.1, parallel = 1)

Arguments

samp.rate
Sampling rate at which the .wav files should be written. The maximum permitted is 44.1 kHz (default). Units should be kHz.
parallel
Numeric. Controls whether parallel computing is applied. It specifies the number of cores to be used. Default is 1 (e.i. no parallel computing). For windows OS the warbleR from github to run parallel.

Value

  • .wav files saved in the working directory with same name as original mp3 files.

Details

convert all .mp3 files in working directory to .wav format. Function used internally to read .mp3 files (readMP3) sometimes crashes.

Examples

Run this code
# First set temporary folder
setwd(tempdir())
 
#Then download mp3 files from xeno-canto
querxc(qword = "Phaethornis aethopygus", download = TRUE)

# Convert all files to .wav format
mp32wav()

#check this folder!!
getwd()

Run the code above in your browser using DataLab