record and analyse real-time audio
Ältere Kommentare anzeigen
For a project im working on i need to record audiodata from a microphone and analyse it simultaneously. I found some threads on mathworks but yet couldnt figure out how to do it.
I startet very basic with this:
fs = 8000 %or whatever suits best
recorder = audiorecorder(fs,24,1); %setting up the recorder
recordblocking(recorder,2); %record 2 secs
data = getaudiodata(recorder); %extract the recorded 2 secs
pitch(data,fs); %plot
This works fine for just 2 secs, but i cant find a way to do this with a 15 minute long recording, extracting every "new" 2 seconds...
From
i tried to obtain the function/timer combination but that didnt work.
I´d be glad to get some help,
thanks in advance!
1 Kommentar
please have a look into the audiodevicereader object. that object can read data much faster and buffer wise (e.g. 1024 samples). look into the documentation of it and come back if you need further assistance
if you have problems with lag, look into your drivers and in doubt, have a look into the Project Asio4all.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Audio I/O and Waveform Generation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!