Object for recording audio
Use anaudiorecorder
object to record audio data from an input device such as a microphone for processing in MATLAB®. Theaudiorecorder
object contains properties that enable additional flexibility during recording. For example, you can pause, resume, or define callbacks using theaudiorecorder
object functions.
creates and returns anrecorder
= audiorecorderaudiorecorder
与这些公关对象operties:
Sampling frequencyFs
= 8000 hertz
Bits per samplenBits
= 8
Number of channelsnChannels
= 1
sets the sample raterecorder
= audiorecorder(Fs
,nBits
,NumChannels
)Fs
(in hertz), the bits per samplenBits
, and the number of channelsnChannels
.
sets the audio input device to the device specified byrecorder
= audiorecorder(Fs
,nBits
,NumChannels
,ID
)ID
.
get |
Query property values foraudiorecorder object |
getaudiodata |
Store recorded audio signal in numeric array |
getplayer |
Creates associatedaudioplayer object |
isrecording |
Determine if recording is in progress |
pause |
Pause playback or recording |
play |
Play audio fromaudiorecorder object |
record |
Record audio toaudiorecorder object |
recordblocking |
Record audio toaudiorecorder object, hold control until recording completes |
resume |
Resume playback or recording from paused state |
set |
Set property values foraudiorecorder object |
stop |
Stop playback or recording |