Re: Input to aplay to make a file instead?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 18/04/2020 13:20, John Murphy wrote:
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@xxxxxxxxxxxxx> 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.
Lately I've been simply using audacity to chop up sound files, mostly just
trimming off the lead-in and any tail from the file, but it's versatile enough
to do just about anything. Converts the formats, etc.

Bill

--
+----------------------------------------+
| Bill Purvis                            |
| email: bill@xxxxxxxxx                  |
+----------------------------------------+
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
https://lists.linuxaudio.org/listinfo/linux-audio-user




[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux