Recording from a microphone on Linux

Getting a microphone working with Linux was not too much work. I’m using the ALSA system for my mixing needs. Here are the steps I followed to being able to record from the microphone into mp3 files.
Plug in the microphone to the microphone jack.
Open the ALSA mixer in the mode where you can see playback and capture devices (on ArchLinux you’ll need the
alsa-utilspackage):alsamixer -V allUse the right and left arrows to move to the Mic device. Press the spacebar to see “L-R CAPTUR” underneath. Then press “M” to mute the microphone. This makes sure you don’t have nasty feedback coming through your speakers.
Use the right and left arrows to move to the “Capture” device. Press the spacebar to see “L-R CAPTUR” underneath. Press the up arrow to move the volume up all the way to 100%.
Hit “Escape” to exit and save your mixer settings.
In a terminal, run the following command:
arecord out.wavSpeak into the microphone as long as you want. Press Ctrl-C to end the recording session.
Encode the WAV file into ogg or mp3, using one of these commands:
oggenc out.wav -o out.ogg lame -b 128 out.wav out.mp3
Of course, you may just want to leave it in WAV format, since the compression won’t make much difference with small file sizes.
Related Posts
Tags: alsa • linux • recording
Posted in linux on January 5th, 2008 |
