Vox Audio File Conversion
Vox and devox is a program I wrote in 1997 when I work at Sprint to
convert audio files between OKI ADPCM (Dialogic vox) file format
and linear audio files, which work with PC audio hardware.
Originally, I posted the code to
Conversions to/from other formats can be accomplished with
Other than corrections submitted by users, no current development work
is going on with the vox program. It is believed to do its intended
job. I am no longer working in the voice processing industry.
I originally wrote the program based on a description of the algorithm
found in the book "PC Telephony - The complete guide to designing,
building and programming systems using Dialogic and Related Hardware"
by Bob Edgar, pg 272-276, third edition, 1995, Flatiron Publishing,
Inc., New York.
Relavent pages are shown here (scanned). I think the book is out of
print, so hopefully listing a few pages from the book is okay.
Since then I found that Dialogic published a standard
for the ADPCM algorithm. Here is the standard,
as once posted on Dialogic's web
page. I don't know if they still post the standard.
Disclaimer: (dated 6/26/2003)
A few people have pointed out to me that there is a minor difference
between my program and the Dialogic standard. The difference relates
to how the step size is calculated. The difference is also
reflected in Edgar's text, which my code is based on. I don't how or
why the difference arouse. I have two comments about said
- I might be able work on a new version of the program which will
match the Dialogic standard; however, since I am not in the voice
processing industry, I don't have any hardware to use to test the new
code. If you have some hardware and are willing to help with testing,
let me know.
- The differences seem to be fairly minor. If you just want to be
able to do simple conversions for listening purposes, my code as it is
will work for you. If you require exact conversion, then my code may
not be what you want.
Clipping problem solved?
vox and devox, have always work fine normally. But in some cases, sound files
recorded with Dialogic hardware were clipped or distorted when
converted to linear (devox) with the original program.
One solution to the problem was to scale the output
file down a little. Joe Carter came up with this solution. See
devox.c lines 204 to 209. This work around was removed when the
believed real source of the problem was found.
Frank van Dijk pointed out that I had an error in the
conversion from 16 bit to 12 bit samples in adpcm.c. The code was
modified on March 30, 2004 to reflect this fix (version 1.1).
Hopefully this finally fixes the clipping problem.
Joe Carter's page dealing with
audio file codecs may be of interest.
Jason Armistead pointed out that there was one inconsistency between the
algorithm implementation and the standard. The second to the last value in
the step size is 1411 in the standard. However, Edgar's book lists this
value as 1408, which was the value used in adpcm.c.
The value was changed in the source code on 3/17/2003.
Copyright 2003, 2004 Tim Bower