Home » Systems » Ubuntu » Using SoX to create GSM audio files in Ubuntu

Using SoX to create GSM audio files in Ubuntu

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.

Installing SoX

If you do not have SoX installed please type the following line.

sudo apt-get install sox

As seen like below.

draalin-using-sox-to-create-gsm-audio-files-in-ubuntu-1

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.

draalin-using-sox-to-create-gsm-audio-files-in-ubuntu-4

Using SoX

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.

draalin-using-sox-to-create-gsm-audio-files-in-ubuntu-8

That is is you are now done!

I have a added an additional gallery below for support.

This slideshow requires JavaScript.

About Tyler Bailey

Tyler Bailey is a university student who owns and runs draalin.com. Follow me on
  • Mexicano

    Mejor explicado no podia estar.
    GRACIAS!