audiorecord —
record audio files
  
    | audiorecord | [ -afhqV] [-Bbuffersize] [-bbalance] [-cchannels] [-ddevice] [-eencoding] [-Fformat] [-iinfo] [-mmonvol] [-Pprecision] [-pport] [-srate] [-ttime] [-vvolume] file | 
The audiorecord program copies the audio device to the
  named audiofile or, if the file name is -, to the standard output.
The output file will contain either a Sun/NeXT audio header, a
    RIFF/WAVE audio header or no header at all. Sun output files using a linear
    PCM encoding are written with big-endian signed samples, possibly after
    converting these from little-endian or unsigned samples. RIFF/WAVE files are
    written in little-endian, signed samples, also converting if necessary. The
    default output is Sun/NeXT format, but if the output file
    file ends with a .wav file
    extension it will be written as RIFF/WAVE.
The following options are available:
  - -a
- Append to the specified file, rather than overwriting.
- -Bbuffersize
- Set the audio device read buffer size to buffersize.
      The default value is the record.buffer_size of the audio device.
- -bbalance
- Set the balance to balance. This value must be
      between 0 and 63.
- -cchannels
- Set number of channels to channels.
- -ddevice
- Set the audio device to be device. The default is
      /dev/sound.
- -eencoding
- Set encoding to either “alaw”, “ulaw”, or
      “linear”, or any other value reported by
      audioctl encodings. The default encoding is
      “ulaw”. If the output format is “sun”, the
      file will contain slinear_be samples, if it is “wav”, then
      slinear_le, independent of the argument to-e.
      Setting the argument to-estill may be important
      since it is used in an
      ioctl(2) call to the kernel
      to choose the kind of data provided.
- -Fformat
- Set the output header format to format. Currently
      supported formats are “sun”, “wav”, and
      “none” for Sun/NeXT audio, WAV, and no header,
    respectively.
- -f
- Force. Normally when appending to audiofiles using the
      -aoption, the sample rates must match. The-foption will allow a discrepancy to be
    ignored.
- -h
- Print a help message.
- -iinfo
- If supported by the -Fformat, add the string
      info to the output header.
- -mmonvol
- Set the monitor volume.
- -Pprecision
- Set the precision. This value is the number of bits per sample, and is
      normally either “8” or “16”, though the values
      “4”, “24”, and “32” are also
      valid.
- -pport
- Set the input port to port. The valid values of
      port are “cd”,
      “internal-cd”, “mic”, and
      “line”.
- -q
- Be quiet.
- -srate
- Set the sampling rate. This value is per-second. Typical values are 8000,
      44100, and 48000, which are the telephone, CD Audio, and DAT Audio default
      sampling rates.
- -ttime
- Sets the maximum amount of time to record. Format is
    [hh:]mm:ss[.dddddd].
- -V
- Be verbose.
- -vvolume
- Set the volume (gain) to volume. This value must be
      between 0 and 255.
  - AUDIOCTLDEVICE
- the audio control device to be used.
- AUDIODEVICE
- the audio device to be used.
Record CD quality audio to a WAVE file:audiorecord -c 2 -e slinear_le -P 16
  -s 44100 recording.wav
audioctl(1),
  audioplay(1),
  aria(4),
  audio(4),
  auich(4),
  autri(4),
  auvia(4),
  clcs(4),
  clct(4),
  cmpci(4),
  eap(4),
  emuxki(4),
  esm(4),
  eso(4),
  ess(4),
  fms(4),
  gus(4),
  guspnp(4),
  neo(4),
  sb(4),
  sparc/audioamd(4),
  sv(4),
  wss(4),
  yds(4),
  ym(4)
The audiorecord program was first seen in SunOS 5. It
  was first made available in NetBSD 1.4. RIFF/WAVE
  support, and support for converting signed/unsigned and big/little-endian
  samples was first made available in NetBSD 1.6.
WAV big-endian samples are converted to little-endian, rather than a RIFX header
  being written.