cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
11120
Views
10
Helpful
4
Replies

How-To: Convert audio files to the desired Cisco format (SoX example)

SebastianV
Level 1
Level 1

Greetings,

This week I spent a few hours on converting PCM encoded wave files to CCITT ulaw encoded wave files. You know, the format we all use for UCCX, IP IVR and the like.

I have been searching the interwebs and came across a few suggestions, amongst others:

o Adobe Audition

o Audacity

I installed Audition Cs5.5 on my Mac, but it wouldn't let me export CCITT ulaw files.

I also installed Audacity, which would let me export files in the right format, but doesn't support batch conversion of audio files. When you're moving from one voice application to another, this is a huge drawback. For occasional conversion, I would recommend this (graphical) tool.

The solution I have used is the open source software SoX (Sound eXchange) which can be found here: http://sox.sourceforge.net/

It is a cross-platform (Win, Linux, Mac) command line utility that can be use to convert audio files, concatenate them and what not. I just this in conjunction with a perl script I made.

The script is attached, in the hope someone else benefits from it. Should work out of the box on Mac and Linux machines. The script will traverse the $dirname directory (not recursively) and convert what it finds to 8bit, 8kHz, mono, CCITT ulaw format.

By the way, to concatenate files just simply type:

sox half1.wav half2.wav full.wav

This will concatenate half1.wav and half2.wav and name the resulting file full.wav.

HTH

P.s: Disclaimer: You might need to edit the script. There is no implied fitness for a particular purpose, YMMV and I shall not be liable for messed up audio files or what not.

Edit: url added.

4 Replies 4

Gergely Szabo
VIP Alumni
VIP Alumni

Hi,

welcome to the beautiful world of open source :-) By the way, I have not seen anybody programming in Perl for a long time.

Just one comment: G.711 uLaw is just the half of the story. Remember, UCCX supports either G.711 uLaw or G.729 as well. And since G.729 has license restrictions (costs $10000 per year if I remember that correctly), no free software can incorporate it to its "convert to" list (apart from reading it, which is fine).

A piece of advice: CUCM has got that voice translator service running, which does the job as well. All you have to do is to upload your files, and you'll get at least four formats ready and available, including G.729 - and it can be downloaded easily using TFTP later and used in UCCX.

G.

Yeah, open source rocks.

Stupidely enough, I have been working with open source a lot. And I did know about the existence of sox, but it took some time to realize that it could perfectly be used for this task (which can be a real pain).

lspiehler
Level 1
Level 1

I developed an online conversion tool that makes this very simple http://kernelmanic.com/call-manager-and-asterisk-audio-converter/

Thanks for this app. I used and worked fine