Permission Denied while trying to play audio

SOLVED: 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')

ORIGINAL QUESTION:
I'm trying to play a sound file 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)

which returns

sh: /var/folders/gg/5v7wvcts2jg4zm40s7r9fgqc0000gn/T//RtmpDWOqTa/tuneRtemp.wav: Permission denied

I've tried the suggested option linked here, but still get the same error message.
I also receive the exact same error when trying to play a .wav file on tuneR.
I'm operating on a macOS High Sierra 10.13.6

SOLVED: 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')

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.