July 27, 2007...7:07 am

Sox

Jump to Comments

A really versatile tool for converting between audio formats. Sox is to audio as convert is to images.

Came in real handy for creating custom IVR prompts and moh, in GSM format, for Asterisk.

Here’s an example, where I’m converting an OGG file to WAV and then resampling it to GSM.

/usr/bin/ogg123 -q -b 128 -p 32 -d wav -f – audio.ogg | sox -r 16000 -t wav – -r 8000 -c 1 -t raw – vol 0.10

Leave a Reply