歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> 在Linux Matlab中利用聲卡采集聲音

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

日期:2017/2/28 16:23:12   编辑:Linux教程

在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

Copyright © Linux教程網 All Rights Reserved