1

I'm trying to play a soundfile using seewave's listen option, and getting a permission denied error

library(seewave)
v.sound <-sin(2*pi*440 * seq(0,1,length.out = 8000))
f <- 8000
seewave::listen(v.sound, f= f)
sh: /var/folders/gg/5v7wvcts2jg4zm40s7r9fgqc0000gn/T//RtmpDWOqTa/tuneRtemp.wav: Permission denied

I get the same result using when using tuneR's play() function to read .wav files. I tried the suggestion here to and got the same results.

I'm using macOS High Sierra 10.13.6

1 Answer 1

3

So it turns out the packages 'sound' and 'tuneR' both use the setWavePlayer() function. I was able to solve this pretty easily with this quick fix

tuneR::setWavPlayer('/usr/bin/afplay')

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.