JavaSonics

SDK

Documentation


Web Home

SDK Home

Docs

Test PHP

Test ASP

Test ASP.NET

Examples

Demos

Download

Purchase

Support

Forum

Login

Contact Us

Company


JavaSonics ListenUp is no longer for sale.

Audio Compression

You have several options for compressing the audio data. Compression reduces the size of the uploaded message so it will upload faster and take less disk space. The down side is that audio compression is "lossy", which means that there will be a very slight degradation in sound.

You can listen to recordings made using various compression formats here.

You can also record your own message using various compression formats here.

The compression type also affect the file format. Select your output format using the "format" Applet parameter. For example:

<applet etcetera>
<param name="format" value="speex">
</applet>

In general, we recommend Speex voice compression for very good quality sound and the smallest file size. But the default format is ADPCM because it is so simple and widely supported.

The accepted values are:

ADPCM - "adpcm" - default

There are many different types of ADPCM. We use the IMA ADPCM format which gives us just under a 4:1 compression ratio. The output is stored in a standard WAV file. One advantage of this format is that most other software programs can play WAV files containing this style of ADPCM.

Signed 16 Bit - "s16"

This is uncompressed 16 bit PCM. This will give you the highest fidelity but will produce very large files.

Unsigned 8 Bit - "u8"

8 bit samples can be quite noisy so we do not recommend the use of this format. But some applications, and some telephone related equipment, require 8 bit unsigned WAV files. So we have provided this format for those circumstances.

Speex - "speex"

Speex voice compression is an open-source algorithm based on a vocal model. It is optimized for voice and can achieve up to 28:1 compression with acceptable quality. Note that Speex requires a frameRate of 8000, 16000 or 32000. 8000 is recommended.

<param name="frameRate" value="8000"

Speex files should have a ".spx" suffix, for example, "mymessage.spx".

Speex is brought to you by the good folks at "speex.org". Speex is open source and may be used freely. Please view the copyrights.

Speex allows you to set a quality parameter called "speexQuality". A lower number will result in more compression and lower audio quality. Try 0.5 for a really crunched voice. Try 3.0 for a nicer sounding voice with bigger files.

<param name="speexQuality" value="3.0">

ULaw - "ulaw"

ULaw, pronounced "meyoo-law", compression is a common format for telecommunications. It provides a 2:1 size reduction and is used by many telephone hardware systems.

Comparison of Compression Formats

You can listen to recordings made using various compression formats here.

Format
File Format
File Suffix
Compression Ratio
Size of one minute message at 8000 Hz
s16
WAVE
.wav
1:1
960,000 bytes
ulaw
WAVE
.wav
2:1
480,000 bytes
u8
WAVE
.wav
2:1
480,000 bytes
adpcm
WAVE
.wav
4:1
240,000 bytes
speex
Ogg
.spx
20:1
48,000 bytes
speex
Ogg
.spx
25:1
38,400 bytes

[Top]  [Previous] [Next]


© 2001-2006 Mobileer, Inc.   This page is from the ListenUp SDK. You can download the SDK from here.