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

al3xu5 / dotcommon dotcommon at autistici.org
Sun Apr 19 12:29:37 CEST 2020

Sat, 18 Apr 2020 09:50:30 +0100 - John Murphy <rosegardener at freeode.co.uk>:

> 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 sox:

sox source.wav -L -c 2 -r 48000 new.wav trim <start_second> <duration_seconds>


-L : little endian
-c 2 : 2-channels stereo
-r 48000 : freq (Hz)
<start_second> : region start (second)
<duration_seconds> : region duration (seconds)



Say NO to copyright, patents, trademarks and any industrial design restrictions.
Public GPG/PGP key
ID:           4096 bit RSA key F94CFE23
Fingerprint:  59C6 9DC7 CD4B CF2F A190  E3DE 69C5 977B F94C FE23
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: Firma digitale OpenPGP
URL: <https://lists.linuxaudio.org/archives/linux-audio-user/attachments/20200419/0abfc21d/attachment.sig>

More information about the Linux-audio-user mailing list