Record audio to audiorecorder object.
record(recorderObj)
record(recorderObj, length)
recorderObj - audiorecorder object: audio recorder object created by audiorecorder.
length - double: duration of recording in seconds.
record(recorderObj) starts recording audio from an input device using the specified audiorecorder object.
record(recorderObj, length) records audio for the specified number of seconds.
The audiorecorder object defines the sample rate, bit depth, and other properties of the recording.
Record 5 seconds of your speech with a microphone
audiorecorder, play, recordblocking, pausearrow-up-right, resume, stop.
1.16.0
initial version
Last updated 29 days ago
myVoice = audiorecorder; myVoice.StartFcn = 'disp(''Start speaking.'')'; myVoice.StopFcn = 'disp(''End of recording.'')'; record(myVoice, 5); play(myVoice);