Recording audio from the speaker

David Fox dfox94085 at gmail.com
Sun Aug 30 04:37:11 UTC 2009


On Wed, Aug 26, 2009 at 6:02 AM, Dotan Cohen<dotancohen at gmail.com> wrote:
> Is there some capture device that I could use to record audio that is
> being sent to the system speakers? I need to record (legally) audio

You probably want to record from the DSP source, which is the signal
sent to the speakers from the sound card. But be careful. For instance
if you have a microphone active that is not muted, you'll record
coughing and key clicks too :).

I used that technique, successfully, when using sox to record radio
programs that I was listening to at the same time, or at a specified
time using cron.

#! /bin/sh
sox -V -c2 -r 44100 -t ossdsp -w -s /dev/dsp $1.ogg


You can use it to record raw, wav, or ogg (I think the latter is
limited to 128k/sec, though). But the trick is the -t ossdsp
parameter. The other parameters set the number of channels (-c2), the
sample rate (r 44100), and the type of sample data (-w -s I think are
unsigned shorts).


-- 
thanks for letting me change the magnetic patterns on your hard disk.




More information about the ubuntu-users mailing list