[asterisk-users] SLN File Format

David Backeberg dbackeberg at gmail.com
Thu May 8 08:23:29 CDT 2008


> 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".



More information about the asterisk-users mailing list