I am playing with some audio and sound packages in R for Windows (mine is Win7 x64). There is a problem when I tried to record from microphone using record() {audio} :
I just wrote a function for record. It works but after a running time, the program has to be closed and then open R again:
audiorec=function(kk,f){ # kk: time length in seconds; f: filename
if(f %in% list.files())
{file.remove(f); print('The former file has been replaced');}
require(audio)
s11 <- rep(NA_real_, 16000*kk) # rate=16000
record(s11, 16000, 1) # record in mono mode
wait(kk)
save.wave(s11,f)
}
Still a problem of GUI. I tried with some other computer using Win7 but met the same error. There is some bugs, I haven't figured it out.