How to record audio with minimum time delay?

4 vues (au cours des 30 derniers jours)
Yanping
Yanping le 8 Oct 2014
I would like to record audio and and analyze it in real-time. The ideal case is to analyze data without interrupting the recording, so that I won't drop any data point in the audio stream. In practical, I can tolerate missing about 1% of the data, so I wrote some code as the below:
arec = audiorecorder(fs_rec,bits,channels,deviceID); while 1 recordblocking(arec,1); sample = getaudiodata(arec); analyze(sample); end
The analyze and getaudiodata function together takes time 0.001 second, so I can tolerate that. The problem is, the function recordblocking takes 1.5 second to record 1.0 second data, and this 0.5 second overhead really causes problems. Is there a way to avoid this overhead time delay, or at least to make it much smaller?

Réponses (0)

Catégories

En savoir plus sur Audio I/O and Waveform Generation dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by