Steps to convert the Asterisk slin (Signed-LINear) format with the new SoX
0
Steps to convert the Asterisk slin (Signed-LINear) format with the new SoX
The steps to convert an audio file in slin format for use with Asterisk are as follows: As you can see in the documentation published in voip-info.org, the version of SoX you are using is outdated, and it cannot be converted with sox-14.4.0 or later versions, so make a note of the conversion procedure corresponding to the new version.
WAV to slin
(short form)
$ sox test.wav -t raw -r 8000 -c 1 test.slin
(long form)
$ sox test.wav --type raw --rate 8000 --channels 1 test.slin
$ file test.slin
test.slin: data
slin to WAV
(short form)
$ sox -t raw -r 8000 -c 1 -b 16 -e signed-integer test.slin -t wav test2.wav
(long form)
$ sox --type raw --rate 8000 --channels 1 --bits 16 --encoding signed-integer test.slin \\
--type wav test2.wav
$ file test2.wav
test2.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz
Further reading
Author by