Audio record in R -


i playing audio , sound packages in r windows (mine win7 x64). there problem when tried record microphone using record() {audio} :

  • it record once cannot record more until restart whole console
  • once sound recorded, save cannot play()
  • file recorded above cannot read audio, tuner due 'incomplete wave file'
  • and following "filename" not work

    filename=paste0('abcd','.wav') save.wave(x,filename)

until type directly command like, makes hard write record script/function

save.wave(x,'abc.wav') 

i want ask used audio package in win , os if met same problem. thanks.

i wrote function record. works after running time, program has closed , 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 problem of gui. tried other computer using win7 met same error. there bugs, haven't figured out.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -