Matlab实时音频处理 [英] Matlab real time audio processing

查看:133
本文介绍了Matlab实时音频处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图记录我的麦克风输入并同时进行处理.

I'm trying to record my microphone input and process it at the same time.

我尝试了一个包含此内容的循环:

I tried with a loop with this inside:

recordblocking(recorder, 1);
y = getaudiodata(recorder);
% any processing on y

但是当我用 y 做某事时,由于没有连续记录,我正在丢失信息.

But while I'm doing something with y, I'm losing information since not recording continuously.

是否可以做一些事情来连续记录麦克风中传来的声音,将其存储在某种缓冲区中,并同时处理其中的一部分?

Is there something I could do to continuously record sound coming in my microphone, store it in some kind of buffer, and process chunks of it at the same time?

延迟不是问题,但我确实需要同时进行记录和处理.

A delay isn't a problem, but I really need the recording and processing done simultaneously.

在此先感谢您的帮助.

推荐答案

我认为您应该像这样使用Stream处理:

I think that you should use Stream processing like this:

% Visualization of audio spectrum frame by frame
Microphone = dsp.AudioRecorder;
Speaker = dsp.AudioPlayer;
SpecAnalyzer = dsp.SpectrumAnalyzer;
tic;
while(toc<30)

audio = step(Microphone);
step(SpecAnalyzer,audio);
step(Speaker, audio);
end

您可以在此处以及此演示文稿

这篇关于Matlab实时音频处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆