record(recorderObj)
record(recorderObj, length)
| Parameter | Description |
|---|---|
| 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.
myVoice = audiorecorder;
myVoice.StartFcn = 'disp(''Start speaking.'')';
myVoice.StopFcn = 'disp(''End of recording.'')';
record(myVoice, 5);
play(myVoice);
| Version | Description |
|---|---|
| 1.16.0 | initial version |