You can also put a bash script in /usr/bin and name it wav-gsm-convert. sln extension (assuming incoming wav files at a sample rate other than 8khz.) for a in *.wav do sox "$a" -t raw -r 8000 -s -c 1 $ resample -ql done It uses sed to automatically rename the files with the. Note that sox v14.3.0 and above (installed in Ubuntu 9.10), the -w option has changed to -2 sox foo-in.wav -t raw -r 8000 -s -2 -c 1 foo-out.sln To convert wav file to sln, use the following command: sox foo-in.wav -t raw -r 8000 -s -w -c 1 foo-out.sln sln (SLINEAR) format seems to be the preferred format. WAV: MS wav format, gsm encoded (wav49) Converting to sln format Rasterisk -x "file convert /tmp/file_in.alaw /tmp/file_out.ulaw" # Converts a audio file from alaw to a ulaw
The command converts between different code formats. In asterisk 1.4 is a conversion application built in, Asterisk file convert. It requires sufficient Linux and telephony knowledge for setup, but it pays off with a number of sophisticated features such as automatic call distribution, IVR systems, codec translation among others. It equips your business with a comprehensive PBX solution and can be run on Linux, BSD and OS X. See below.) What is AsteriskĪsterisk is an open source framework for building your own communication applications.
So what do you do? How can you convert your WAV files into GSM files that still have good sound quality? (This is partially false, Asterisk can play anything it has a format and codec for, including some wav files.
Then you realize that Asterisk does not use WAV format audio for the Playback or Background applications. You just recorded a fabulous audio file to use as your main voice menu.