How to use recordblocking for an infinite interval?
Show older comments
I need to record an audio until I stop the recording (using a button or something), do you know how to do it?
Answers (1)
Geoff Hayes
on 28 Oct 2021
0 votes
@Marie Kate Palau I don't think you want to use recordblocking since that would prevent you from stopping the recording after an unknown period of time. Try using record instead. I'm assuming that you have a GUI to start and stop the recording?
4 Comments
Marie Kate Palau
on 28 Oct 2021
Geoff Hayes
on 28 Oct 2021
So long as you have access to the audiorecord object, then you should be able to just stop it. For example, from the MATLAB command line, try doing
>> myRecorder = audiorecorder;
>> record(myRecorder);
Now you can start talking, singing, etc. And when you are ready to stop the recording, just do
>> stop(myRecorder);
Marie Kate Palau
on 28 Oct 2021
Walter Roberson
on 28 Oct 2021
Your code is stopping recording immediately after sending out the message 'Deje de hablar' .
Consider something like
record(myRecorder);
% Graba durante 2 segundos
menu("Deje de hablar", "para de grabar");
stop(myRecorder);
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!