您的位置:首页 > 编程语言 > MATLAB

matlab 读取音频并显示波形

2017-07-10 12:19 387 查看

主要函数

audioread

代码

%%
tic
interval = 44100;
need_exist = false;
index = 1;
while ~need_exist
try
[x, fs] = audioread( '1.mp3' , [(index-1)*interval+1, index*interval ]);
catch
[x, fs] = audioread( '1.mp3' , [(index-1)*interval+1, inf ]);
need_exist = true;
end
index = index + 1;
plot(x)
drawnow
%     pause(0.)
end
toc
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  matlab audio