### 33.4 Audio Recorder ¶

The following methods are used to create and use audiorecorder objects. These objects can be used to record audio data from various devices available to the system. You can use convenient methods to retrieve that data or audioplayer objects created from that data. Methods for blocking and non-blocking recording, pausing and resuming recording and much more is available.

`recorder =` audiorecorder `()` ¶
`recorder =` audiorecorder `(fs, nbits, nchannels)` ¶
`recorder =` audiorecorder `(fs, nbits, nchannels, id)` ¶

  Create an audiorecorder object recording 8-bit mono audio at 8000 Hz sample rate.

  The optional arguments fs, nbits, nchannels, and id specify the sample rate, number of bits per sample, number of channels, and recording device ID, respectively. Device IDs may be found using the `audiodevinfo` function.

  The list of actions for an audiorecorder object are shown below. All methods require an audiorecorder object as the first argument.

  Method | Description
  --- | ---
  get | Read audiorecorder property values
  getaudiodata | Return audio data as a numeric matrix
  getplayer | Return audioplayer loaded with data from audiorecorder
  isrecording | Return true if audiorecorder is recording
  pause | Pause recording
  play | Play audio stored in audiorecorder object
  record | Record audio in audiorecorder object w/o blocking
  recordblocking | Record audio in audiorecorder object
  resume | Resume recording after pause
  set | Write audiorecorder property values
  stop | Stop recording

  See also: @audiorecorder/get, @audiorecorder/getaudiodata, @audiorecorder/getplayer, @audiorecorder/isrecording, @audiorecorder/pause, @audiorecorder/play, @audiorecorder/record, @audiorecorder/recordblocking, @audioplayer/resume, @audiorecorder/set, @audiorecorder/stop, audiodevinfo, @audioplayer/audioplayer, record.