Dialogic Voice Cards - How to find the offset for the data in a WAV file

Dialogic Voice Cards - How to find the offset for the data in a WAV file

Symptom

When playing a .wav file from an offset, the play sounds distorted.

Reason for the issue

There are two main possible reasons for this behavior:

  1. Coder mis-match (for instance, the .wav file was recorded using a-law and is being played back using mu-law)

  2. The .wav file is being played using an incorrect offset.

The following RTF log entries indicate that the .wav file is being played using the wrong offset.

02/20/2007 16:13:42.759 2488 4484 dm3low ERR1 WaveServices ===== Not a RIFF file 02/20/2007 16:13:42.759 2488 4484 dm3low ERR1 WaveFileSource dxxxB10C1 ===== Not a WAVE file

Fix / Solution

The solution is to use a 3rd party hex file editor to identify where the raw data of a wav file begins, 5 bytes after the string 'data' in the RIFF header.  

The following screenshots are taken from different hex editors.

The offset for this .wav file is hex 2c or 44 decimal:

The offset for this .wav file is hex 2c or 44 decimal:

The offset for this .wav file is 90 decimal, which is hex 5A.