It is supposed to be possible to record directly in to Audacity, but I couldn't get that to work on my system (Ubuntu 10.10).
So following the instructions here from the Audacity wiki, I use the
ALSA playback device to divert the audio to a file.
This uses an
.asoundrc file (in your home directory):
# 48000 S16_LE 2ch (aplay -t raw -f dat)
For recording from flash (on firefox), I use
The resulting file,
/tmp/out.raw is in raw format so converting it needs knowing what the right parameters are.
lame seems able to work this out for itself but
sox needs to know it explicitly.
So the following all seem to work:
aplay -t raw -f dat -r 44100 /tmp/out.raw # to play
sox -r 44100 -b 16 -e signed -c 2 /tmp/out.raw /tmp/out.wav # to convert to wav
lame /tmp/out.raw # to convert to mp3