Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. %Record your voice for 3 seconds
  2. recObj= audiorecorder(44100,16,1);
  3. disp('Start speaking.')
  4. recordblocking(recObj,3);
  5. disp('End of Recording.');
  6.  
  7. %Play back the recording.
  8. play(recObj);
  9. %Store data in double-precision array.
  10. myRecording = getaudiodata(recObj);
  11.  
  12. %Plot the waveform.
  13. plot(myRecording);
  14.  
  15. audiowrite('filename',myRecording,44100);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement