How can I process speech without stopping the recording in MATLAB?
Show older comments
I am currently process speech signal with recording simultaneously.
More specifically,
(1) Record every 0.1s speech repeatedly.
(2) Process each speech chunk(0.1s) as FIFO sense. (let say processing function 'test') 'test' function takes about 1s for processing each chunk of speech.
I wrote the code as follows :
r = audiorecorder(fs,16,1);
record(r,0.1);
data{k} = getaudiodata(r);
test(data{k});
The problem is that I miss sample of 1s speech during 'test' function is executed. I want recording to be executed without stop, and call the function 'test' in every 0.1s speech recording.
So, I try to use function callback provided for 'audiorecorder'. I used StopFcn , which is the function to be executed just after stopping record, But this function callback used same thread with recording. So,I need to try other approaches.
I got a clue that 'multi-threading', 'parallel computing toolbox' would be helpful for me. But I don't know how to apply it for my problem.
Is there anyone who can give me some advice? I really appreciate all of your comments.
Accepted Answer
More Answers (0)
Categories
Find more on Cepstral Analysis in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!