Vectorized version of slice_one_wav_*() family of functions. Store in disk the slices of every file of a vector of mp3 file names.

slice_wavs(audio_dir, audio_dir_dest = NULL, interval = 1, parallel = 1)

Arguments

audio_dir
audio_dir_dest
interval
parallel
audio_ext

Value

Examples

library(mestrado) wav_dir <- system.file("wav_sample", package = "mestrado") temp_dir <- tempdir() slices_path <- slice_wavs(wav_dir, temp_dir)
#> Warning: 'from' > 'to', object is unchanged
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to min; returning Inf
#> Warning: 'from' > 'to', object is unchanged
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to min; returning Inf
#> Warning: 'from' > 'to', object is unchanged
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to min; returning Inf
#> Warning: 'from' > 'to', object is unchanged
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to min; returning Inf
#> Warning: 'from' > 'to', object is unchanged
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to min; returning Inf
#> Warning: 'from' > 'to', object is unchanged
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to min; returning Inf
#> Warning: 'from' > 'to', object is unchanged
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to min; returning Inf
#> Warning: 'from' > 'to', object is unchanged
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to min; returning Inf
#> Warning: 'from' > 'to', object is unchanged
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to min; returning Inf
slices_path
#> [1] "/tmp/Rtmplo0aRK"
slices <- list.files(slices_path) slices[4:7]
#> [1] "file337770814099.so" #> [2] "Glaucidium-minutissimum-24426@0@0@.wav" #> [3] "libloc_169_8f48fc7d1db1bb3e.rds" #> [4] "libloc_190_d0f9766fb89cc631.rds"