MATLAB: Is it possible to use audiorecorder to capture real-time audio data over an extended time period

audiodevicereaderaudiorecorderMATLABreal time

I want to capture audio data over a long time period (hours to days) and process the data in pseudo-real time (a few hundred micro-seconds delay maximum). Can I use the function "audiorecorder" to do this?

Best Answer

You can use timers to read the data from "audiorecorder" using "getaudiodata" at set intervals, but "audiorecorder" is not designed for use over an extended time period, as the size of the audio data and buffers will grow over time and will become too large to hold in memory. 
You can instead use an "audioDeviceReader" object from the Audio System Toolbox to capture your audio. See the following documentation page for more information: