SoX (Sound eXchange)
SoX is a popular and free sound software that allows you to both read and create audio sound files.
This guide will show you how to use SoX to create GSM (Global System for Mobile) audio files.
GSM audo files are used telephony use. You have probably heard them used in a IVR (Inerative Voice Response) system through a companies phone menu.
For our example we are going to convert audio files from WAV to GSM.
AT&T’s text-to-speech utility
We are going to use AT&T’s text-to-speech utility (which is free) to create our WAV audio files.
Browse to the following link here and create your custom WAV audio files.
After that place it into a directory on your server which you will remember.
If you do not have SoX installed please type the following line.
sudo apt-get install sox
As seen like below.
Installing the required libraries
We now need to install the libraries for converting from the audio files from WAV to gsm
sudo apt-get install sox libsox-fmt-all
Ensure that you accept the Do you want to continue [Y/n]? with Y once you are prompted like below.
Browse to the directory of your wav file you downloaded earlier and use sox in a format like this.
We use a rate of 8000 because digital telephony with GSM traditionally uses a sample rate of 8000 hz (8 kHz)
Type the following command with “infile" and “outfile" replaced with the input file name and desired output file name respectfully.
sox -r 8000 infile.wav outfile.gsm
If you get a clean output like seen below it worked correctly.
That is is you are now done!
I have a added an additional gallery below for support.