rec & record

The commands rec and record will record audio from a microphone, and write it as a WAV file.

rec is a part of the sox package.
record is a standalone program.

Both have options to set the sampling rate (the default is 44.1 kHz). rec also has options to set the number of channels (mono or stereo), and the sample size (8 bit or 16 bit).

rec -c 1 -r 22050 voice.wav

will record audio from the microphone as a 1-channel (monaural), 22.05 kHz WAV file. Hit control-c to stop the recording.



next