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} :
- it could record only once then cannot record some more until restart the whole console
- once sound is recorded, it could be save but cannot play()
- file recorded from above cannot be read by audio, but tuneR due to 'incomplete wave file'
and the following "filename" does not work
filename=paste0('abcd','.wav') save.wave(x,filename)
until type directly to the command like, this makes hard to write a record script/function
save.wave(x,'abc.wav')
I want to ask anyone used audio package in Win and another OS if you met the same problem. Thanks.
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:
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.
You can simply use http://www.rforge.net/audio, the code should look like this: