在Linux Matlab中利用声卡采集声音

在Linux Matlab中利用声卡采集声音,需要用到audiorecorder函数(在windows中是wavrecord),

r = audiorecorder(44100, 16, 1); %采样率,采样位数,单声道
record(r);     % speak into microphone...调用record方法的时候开始录音
pause(r);
p = play(r);   % listen
resume(r);     % speak again
stop(r);
p = play(r);   % listen to complete recording
mySpeech = getaudiodata(r, 'int16'); % get data as int16 array

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/25228.html