[Speex-dev] CCITT A-Law to Speex conversion

Sander Bol k.ander at gmail.com
Tue Jul 29 10:31:21 PDT 2008

Hello group,

I'm not sure this is the right place to ask a user-question instead of a
dev-question - if not, a pointer in the proper direction would be

My issue is that I want to automatically (in a nightly batch job)
convert a large number of voice recordings from A-Law WAV to Speex, in
order to reduce storage and bandwidth demands for tranferring the files
over our LAN. In my understanding, SpeexEnc can not handle A-Law
directly (it tells me it can only handle PCM). Google has led me to
believe SOX is an appropriate tool to first convert A-Law --> PCM, which
can then be piped into SpeexEnc. Having found that, I've looked into
SOX, but having no background in audio conversion I find myself slightly
overwhelmed with the plethora of options and switches available. The
attempts I've done so far, fiddling with different in-file and out-file
settings, resulted in lots of clipping in the intermediate WAV file, and
static noise (or the PCM error) when trying to convert the resulting
file in Speex. Further Googling has yielded lots of shareware sites
offering GUI-based tools that can convert between a myriad of formats,
but have not resulted in any relevant hits.

Is SOX indeed the proper tool to use, and if so, what switches do I need
in order to convert these files to a format Speex can handle with as
little pre-Speex loss as possible?

Thanks for your time,

Sander Bol

More information about the Speex-dev mailing list