[Asterisk-Users] VoiceMailBox wav file format in EMAIL.

Steven Critchfield critch at basesys.com
Thu Apr 15 10:28:22 MST 2004


On Tue, 2004-04-13 at 01:12, James Gardiner wrote:
> Hi all,
> I am not sure if tis is a bug but..
> Was learning about VM etc to see how it all worked, and I noticed the
> following..
> 
> In the default install, the VM system leaves 3 different copies of the Voice
> message.
> Size	filename
> 13kb	Msg0000.gsm

This is a raw gsm frame dump of the audio. It contains no headers for a
sound editing app to understand it.

> 13kb	Msg0000.wav

This is the previous GSM frames wrapped in a RIFF wav header and the
appropriate bit shifting to make windows happy.

> 122kb	Msg0000.WAV  <- under UNIX we have case sensitive file names of
> course.

This is raw PCM. That is why it is larger.

> I wanted to have a look at these files so loaded them into SOUND FORGE 6.
> This first thing I noticed was that the LARGER file is of much HIGHER
> volume. Like it had been normalised to 100%
> The smaller was file, when loaded into sound forge, did not load properly,
> only the first 2 seconds loads.
> 
> Can anyone explain these issues and why they exist?

For some reason the PCM files are bit shifted up. This gives the effect
of doubling the volume. If I understand it though, it is also bit
shifted down when played back via asterisk. So you loose the volume if
asterisk replays the audio file.

> All in all, I was wondering what would be the best format for best quality
> but with still great compression.

GSM is fine enough for the prompts.

> I want to archive all calls for a period of time with self expire. (For
> example dedicate 5 gig disk space to the last number of calls that can fit
> in the 5gig.) I want to store the best quality possible but also make best
> use of disk space, so I can store for even longer periods.  I was
> considering ogg but then is occurred to me that GSM or other codecs designed
> for audio with this frequency response may be better. (But the GSM file
> above is not as clear as the WAV ones produced.)

GSM is good. 33 bytes per 20ms will get you a long ways. From what I
see, here is your capacity.
(5*1024*1024*1024)/(50 blocks a second * 33 bytes per block)/60 seconds
per minutes /60 minutes per hour and you get 903 hours. then remove a
certain amount for disk block alignment, formatting, and the lost
fragments at the end of a 4k cluster and you are now down to a realistic
800 hours of record time or 33 and a 3rd hours of a constant T1 of audio
calls.

> I was also wondering if the VM system when emailing the audio can be setup
> to use something like ogg or MP3?

ogg and mp3 are not good choices for telephone quality. They don't get
that great of compression unless you start sacrificing a lot of quality.
-- 
Steven Critchfield  <critch at basesys.com>




More information about the asterisk-users mailing list