フィルターのクリア

How can I process speech without stopping the recording in MATLAB?

2 ビュー (過去 30 日間)
Gun-min Kim
Gun-min Kim 2012 年 5 月 14 日
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.

採用された回答

Walter Roberson
Walter Roberson 2012 年 5 月 14 日
You will probably not be able to do this using audiorecorder. You will probably have to switch to a data-acquisition design. analoginput() from the device, set up a BytesAvailableFcn callback that queues the data into an internal buffer. Your regular routine would loop around looking in the queue for work and processing what it finds there.
  1 件のコメント
Gun-min Kim
Gun-min Kim 2012 年 5 月 14 日
Thanks for your reply !
But unfortunately, my OS is 64bit (win64 platform) so I cannot use 'analoginput' according to the MATLAB error message. Can you show some simple example codes that I can refer? It can be very helpful for solving my problem.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by