[asterisk-dev] How does Digium make their .g722 prompts

Kevin P. Fleming kpfleming at digium.com
Wed Oct 14 08:55:39 CDT 2009

Stephen Davies wrote:

> I have a set of prompt files in 44.1/48kHz WAV files and want to convert
> them to .g722 files.  But I don't want to go via 8000Hz wav files as I
> want to keep the extra quality.
> Can't figure out how to do the conversion.  sox doesn't do g722, "file
> convert" at the CLI doesn't handle the 48kHz files that I have.
> Can Digium tell me how they do it?

We have a small tool we wrote that uses the G.722 encoder from spandsp
(the same one we use in codec_g722 in Asterisk itself) to do it. We
haven't published it because the code is not in a state where we'd want
people to see it :-)

You can use the 'file convert' CLI command in Asterisk to do this if you
use 1.6.1 or later, as those versions support 16kHz signed linear
(sln16) files; so you'd use sox to convert to sln16, then Asterisk to
convert to G.722.

Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kpfleming at digium.com
Check us out at www.digium.com & www.asterisk.org

More information about the asterisk-dev mailing list