Java sound and compression

C

carmelo

Hi everybody,
I developed a simple java app for sending voice from a trasmitter to a
receiver on LAN. I used only java.sound, without JMF. Data are sent in
raw format without any compression. I'd like to compress/decompress
this audio stream. Anybody can help me about that?


Thank you very much for your help!
 
K

Knute Johnson

carmelo said:
Hi everybody,
I developed a simple java app for sending voice from a trasmitter to a
receiver on LAN. I used only java.sound, without JMF. Data are sent in
raw format without any compression. I'd like to compress/decompress
this audio stream. Anybody can help me about that?


Thank you very much for your help!

You need to take a look at Tritonus and their GSM audio format.

http://tritonus.org/

Barring that you could use the ULAW or ALAW audio formats to transmit
your data and then convert it back. This is only going to help you if
you've been using a 16 bit format.

One thing I haven't tried and so I don't know how much actual
compression you would get is to use one of the compressed streams, GZIP
streams or Zip streams.
 
C

csaffi

You need to take a look at Tritonus and their GSM audio format.

http://tritonus.org/

Barring that you could use the ULAW or ALAW audio formats to transmit
your data and then convert it back.  This is only going to help you if
you've been using a 16 bit format.

One thing I haven't tried and so I don't know how much actual
compression you would get is to use one of the compressed streams, GZIP
streams or Zip streams.

Thank you for your reply Knute.
Have you got any example on how to encode/decode an audio stream with
Tritonus?
What do you think about JSpeex? Do you think that it could be better
than GSM for VOIP?


Thank you very much again
Cheers
Carmelo
 
R

Roedy Green

I developed a simple java app for sending voice from a trasmitter to a
receiver on LAN. I used only java.sound, without JMF. Data are sent in
raw format without any compression. I'd like to compress/decompress
this audio stream. Anybody can help me about that?

You probably want to convert to MP3 format and use JMF.

see thtp://mindprod.com/jgloss/jmf.html
--
Roedy Green Canadian Mind Products
http://mindprod.com

"You can have quality software, or you can have pointer arithmetic; but you cannot have both at the same time."
~ Bertrand Meyer (born: 1950 age: 59) 1989, creator of design by contract and the Eiffel language.
 
M

Mike Amling

carmelo said:
Hi everybody,
I developed a simple java app for sending voice from a trasmitter to a
receiver on LAN. I used only java.sound, without JMF. Data are sent in
raw format without any compression. I'd like to compress/decompress
this audio stream. Anybody can help me about that?

I wrote a similar Java app 10 years ago, using just ADPCM for
compression (without mu-law or A-law). IIRC, it compresses by a factor
of 2. The code was easy enough to write, without using any libraries.

--Mike Amling
 
K

Knute Johnson

csaffi said:
Thank you for your reply Knute.
Have you got any example on how to encode/decode an audio stream with
Tritonus?

I don't have any code examples but it is pretty simple to use. The
website has some examples of use and if you decide to use it, post here
and we can help you get going.
What do you think about JSpeex? Do you think that it could be better
than GSM for VOIP?

I haven't played with JSpeex so I can't give you an answer on that one.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top