I am running a sound analysis function on around 25k short audio files. My code works but will take a very long time to run. What would be a good approach to parallelize it?
Thanks a lot,
files = list.files(getwd(), pattern=".mp3", all.files=FALSE, full.names=FALSE)
out=NULL
for (i in files) {
res <- try(soundgen::analyze(i,pitchMethods = 'dom', plot = FALSE, summary = TRUE), silent = TRUE)
res["1", "duration"] <- i[[1]]
out=rbind(out,res)
print(i)
}