Re: Swiss Army Knife of Sound has me Baffled.
Martin McCormick wrote:
> So, I want a mono version. Let's try this:
>
> #! /bin/sh
> cd ~/tmp
> filename=$1.wav
> echo $filename
> arecord -D hw:1,0 -r 48000 -d $2 -c 1 -f S16_LE - \
> | sox -t wav - -r44100 $filename
>
> This hasn't worked yet. It is identical to the good version but
> for c 1 as the number of channels to arecord instead of c 2 .
...
> arecord: set_params:1345: Channels count non available
> sox FAIL formats: can't open input `-': WAVE: RIFF header not found
Keep recording 2 channels. Your hardware doesn't like it
otherwise.
You can ask sox:
sox -t wav -c1 - -r44100 $filename
to merge the channels to a single output channel
I believe, but have not tested, that a final argument to sox of
remix 1
will get you just the left channel, or remix 2 for the right
channel.
-dsr-
Reply to: