On Thu, May 08, 2008 at 09:23:29AM -0400, David Backeberg wrote:
> > Tzafrir Cohen wrote:
> > > The only downside is that you can simply concatenate two files using
> > > 'cat file1 file2 >file1file2' with wav as you can with raw formats
> > > (provided that both originals are of the same format), because the
> > > header is not part of the stream.
> >
> > Correction for the archives ... you can _not_ simply concatenate two [wav]
> > files. :)
>
> Agreed. With wavs, you first have to convert to a raw format, then you
> can concatenate, then you can convert back to wav.
>
> $ for i in *.wav ; do echo $i; sox $i -r 8000 -c 1 -s -w $i-.raw; done
> part1.wav
> part2.wav
> part3.wav
> part4.wav
> part5.wav
> part6.wav
>
> $ ls
> part1.wav part2.wav part3.wav part4.wav
> part5.wav part6.wav
> part1.wav-.raw part2.wav-.raw part3.wav-.raw part4.wav-.raw
> part5.wav-.raw part6.wav-.raw
>
> $ cat part1.wav-.raw part2.wav-.raw part3.wav-.raw part4.wav-.raw
> part5.wav-.raw part6.wav-.raw > whole_thing.wav-.raw
>
> $ sox -r 8000 -c 1 -s -w whole_thing.wav-.raw whole_thing.wav
>
> So much for "getting rid of sox".
Well, you could convert it with Asterisk (using e.g. "convert", and
batching of commands is nicer using the ast-cli script , though it
requires manager access setup).
But sox is nicer, indeed.
In later versions (at least in Debian) sox packages support for
different formats separately. Thus you don't have to carry with you
support for vorbis, mp3 and such just to process simple wav/riff files.
--
Tzafrir Cohen
icq#16849755 jabber:[EMAIL PROTECTED]
+972-50-7952406 mailto:[EMAIL PROTECTED]
http://www.xorcom.com iax:[EMAIL PROTECTED]/tzafrir
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users