• Post Reply Bookmark Topic Watch Topic
  • New Topic

Voice over UDP Packets

 
Shiham Nawaz
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm developing an application which transfers voice though UDP sockets. I developed a chat application usng UDP, and now i want to add voice to these datagramPackets.
I dont want to involve TCP Sockets in this application.

I need to know the following please:
*To get the Voice(when someone speaks into the mic) and add it into
datagramPackets.
*Transfer the packets from a Client to the Server machine.
*Play the voice (in a proper way) on the server side speaker.

please give a code example if possible.

Thank you
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For manipulating audio data you need the Java Media API here. (not part of the standard library)

For UDP - see the Javadocs for the java.net package. (part of the standard library since version 1)

Bill
 
Shiham Nawaz
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks alot Bill,
I did a bit of research also and found that the JMF API will be useful for this implementation.

I've got a problem with getting the voice from a mic and breaking them into RTP packets of a recommended size (for fast tranfer), before sending it to the other machine. Can i pls get some help in this regard?. And any algorithms used to do this?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!