How can i recording audio immediately?

6 ビュー (過去 30 日間)
Samuele Sandrini
Samuele Sandrini 2019 年 11 月 14 日
コメント済み: Walter Roberson 2019 年 11 月 19 日
I'm working with audiorecorder object for recording audio, with this code:
recObj = audiorecorder(8000,16,1)
recordblocking(recObj, 1);
audioarray = getaudiodata(recObj);
plot(audioarray)
I noticed that the registration doesn't start immediately, but it waits about 0.4/0.5 s. You can see this problem with this image:
I need that it starts immediately after i run the recording (also because i would like to create small (acquisition windows, about 0.2 s).
I also tried to use pause() and resume() but it has the same problem.
What can i do to solve this problem?
Thanks in advance

採用された回答

Gaurav Garg
Gaurav Garg 2019 年 11 月 19 日
Hi,
Given below is a command which will open example for you which will help you record the audio immediately.
openExample('audio/ReadFromMicrophoneAndWriteToAudioFileExample')
Moreover, you can also modify the default properties of your audioDeviceReader object to reduce latency.
openExample('audio/CalculateLatencyDueToDeviceBufferExample')
You can also go through this link for any information.
  1 件のコメント
Walter Roberson
Walter Roberson 2019 年 11 月 19 日
(The above uses Audio System Toolbox)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAudio I/O and Waveform Generation についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by