[Asterisk-Users] RE: play gsm files in windows

Johnathan Corgan jcorgan at aeinet.com
Mon May 23 10:07:55 MST 2005


If I run sox (on Linux), just specifying the input and output files by 
with the right extensions, it will convert a raw gsm file to a wav 
format file while retaining the gsm compression:

sox vm-youhave.gsm vm-youhave.wav

This is without any additional options. The output file is playable on 
my Windows Media Player in XP.

However, the wave file is still compressed with gsm as indicated in the 
Summary tab of the Properties for the output file.  It shows a bitrate 
of 13 Kbps, and sample rate of 8 Kbps, and a format of GSM 6.10.

The original file was 1320 bytes, and the produced wave file is only 
1360 bytes.  I thought perhaps sox was just adding the right wave file 
header/wrapper around the original gsm data, but a file compare doesn't 
bear this out.  All the bytes in the wave file are new.

I'm not a sound file guru--can someone explain what is happening here? 
Is sox uncompressing and recompressing the audio during the conversion, 
resulting in loss?  Or, does the wave format for gsm compressed data 
store things differently, but uses the same underlying GSM bits, hence 
the differences in the file compare?

-Johnathan



More information about the asterisk-users mailing list