在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

此文章由 http://www.ositren.com 收集整理 ,地址为: http://www.ositren.com/htmls/61364.html