Re: [LAU] Input to aplay to make a file instead?

From: John Murphy <rosegardener@email-addr-hidden>
Date: Sat Apr 18 2020 - 15:20:55 EEST

On Sat, 18 Apr 2020 11:53:35 +0100 Bill Purvis wrote:

> On 18/04/2020 11:05, John Murphy wrote:
> > On Sat, 18 Apr 2020 09:55:12 +0100 Will Godfrey wrote:
> >
> >> On Sat, 18 Apr 2020 09:50:30 +0100
> >> John Murphy <rosegardener@freeode.co.uk> wrote:
> >>
> >>> I use a program which plays regions of various .wav files. Its
> >>> output pipes into aplay like: '| aplay -f FLOAT_LE -c 2 -r 48000'
> >>>
> >>> To where can I pipe its output, instead, to make a new .wav file,
> >>> or make a compressed file? Preferably faster than the region(s)
> >>> take to play.
> >>>
> >>> Or, if not, make aplay write to a file instead of playing?
> >>>
> >>> Thank you.
> >>>
> >> Use arecord instead.
> >>
> > Thanks. I saw the -C switch (or arecord), but didn't try it because
[...]
> You should be able to use sox to do that, specify the input format, and
> an output format and it should sort it out. I've not done this for ages,
> but it's the sort of thing sox was created for.
>
> Bill
>
Looks promising, thanks:

SoX can be used in simple pipeline operations by using the special filename
`-' which, if used as an input filename, will cause SoX will read audio data
from `standard input' (stdin)

Can't quite do it though. aplay gets -f FLOAT_LE -c 2 -r 48000 I've tried:

 | sox -t raw -r 48k -c 2 -L -e float - dump-SOX-test.wav
sox FAIL formats: bad input format for `-': data encoding or sample size was not specified
 | sox -t wavpcm -r 48k -c 2 -L -e float - dump-SOX-test.wav
sox FAIL formats: can't open input `-': WAVE: RIFF header not found

I'm guessing though really.

-- 
John.
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
https://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Sun Apr 19 04:15:03 2020

This archive was generated by hypermail 2.1.8 : Sun Apr 19 2020 - 04:15:03 EEST