05 April 2007

Voice Chat Using Java

Two way Communication:

Step 1: first execute sender class
Step 2: Here after execute Tx class

Download Source : revoicechatusingjava.zip

Warning: Dont execute using sampe pc use different pc for each files otherwise it will be rise error ( mic already busy )

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.Mixer;
import javax.sound.sampled.SourceDataLine;
import javax.sound.sampled.TargetDataLine;

public class sender {
ServerSocket MyService;
Socket clientSocket = null;
BufferedInputStream input;
TargetDataLine targetDataLine;

BufferedOutputStream out;
ByteArrayOutputStream byteArrayOutputStream;
AudioFormat audioFormat;

SourceDataLine sourceDataLine;
byte tempBuffer[] = new byte[10000];

sender() throws LineUnavailableException{
try {
audioFormat = getAudioFormat();
DataLine.Info dataLineInfo = new DataLine.Info( SourceDataLine.class,audioFormat);
sourceDataLine = (SourceDataLine)
AudioSystem.getLine(dataLineInfo);
sourceDataLine.open(audioFormat);
sourceDataLine.start();
MyService = new ServerSocket(500);
clientSocket = MyService.accept();
captureAudio();
input = new BufferedInputStream(clientSocket.getInputStream());
out=new BufferedOutputStream(clientSocket.getOutputStream());

while(input.read(tempBuffer)!=-1){
sourceDataLine.write(tempBuffer,0,10000);
}
} catch (IOException e) {

e.printStackTrace();
}

}
private AudioFormat getAudioFormat(){
float sampleRate = 8000.0F;
int sampleSizeInBits = 16;
int channels = 1;
boolean signed = true;
boolean bigEndian = false;
return new AudioFormat(
sampleRate,
sampleSizeInBits,
channels,
signed,
bigEndian);
}
public static void main(String s[]) throws LineUnavailableException{
sender s2=new sender();
}


private void captureAudio() {
try {

Mixer.Info[] mixerInfo = AudioSystem.getMixerInfo();
System.out.println("Available mixers:");
for (int cnt = 0; cnt < audioformat =" getAudioFormat();" datalineinfo =" new" mixer =" AudioSystem.getMixer(mixerInfo[3]);" targetdataline =" (TargetDataLine)" capturethread =" new" cnt =" targetDataLine.read(tempBuffer," stopcapture =" false;" out =" null;" in =" null;" sock =" null;" tx =" new" sock =" new" out =" new" in =" new" mixerinfo =" AudioSystem.getMixerInfo();" cnt =" 0;" audioformat =" getAudioFormat();" datalineinfo =" new" mixer =" AudioSystem.getMixer(mixerInfo[3]);" targetdataline =" (TargetDataLine)" capturethread =" new" datalineinfo1 =" new" sourcedataline =" (SourceDataLine)" playthread =" new" bytearrayoutputstream =" new" stopcapture =" false;" cnt =" targetDataLine.read(tempBuffer,"> 0) {

byteArrayOutputStream.write(tempBuffer, 0, cnt);

}
}
byteArrayOutputStream.close();
} catch (Exception e) {
System.out.println(e);
System.exit(0);
}
}
}

private AudioFormat getAudioFormat() {
float sampleRate = 8000.0F;

int sampleSizeInBits = 16;

int channels = 1;

boolean signed = true;

boolean bigEndian = false;

return new AudioFormat(sampleRate, sampleSizeInBits, channels, signed,
bigEndian);
}

class PlayThread extends Thread {
byte tempBuffer[] = new byte[10000];

public void run() {
try {
while (in.read(tempBuffer) != -1) {
sourceDataLine.write(tempBuffer, 0, 10000);
}
} catch (IOException e) {
e.printStackTrace();
}
}
}

}

----------------------------------------------

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.net.Socket;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.Mixer;
import javax.sound.sampled.SourceDataLine;

import javax.sound.sampled.TargetDataLine;

public class Tx {
boolean stopCapture = false;

ByteArrayOutputStream byteArrayOutputStream;

AudioFormat audioFormat;

TargetDataLine targetDataLine;

AudioInputStream audioInputStream;

BufferedOutputStream out = null;

BufferedInputStream in = null;

Socket sock = null;

SourceDataLine sourceDataLine;

public static void main(String[] args) {
Tx tx = new Tx();
tx.captureAudio();

}

private void captureAudio() {
try {

sock = new Socket("192.168.1.51", 500);

out = new BufferedOutputStream(sock.getOutputStream());
in = new BufferedInputStream(sock.getInputStream());

Mixer.Info[] mixerInfo = AudioSystem.getMixerInfo();
System.out.println("Available mixers:");
for (int cnt = 0; cnt < audioformat =" getAudioFormat();" datalineinfo =" new" mixer =" AudioSystem.getMixer(mixerInfo[3]);" targetdataline =" (TargetDataLine)" capturethread =" new" datalineinfo1 =" new" sourcedataline =" (SourceDataLine)" playthread =" new" bytearrayoutputstream =" new" stopcapture =" false;" cnt =" targetDataLine.read(tempBuffer,"> 0) {

byteArrayOutputStream.write(tempBuffer, 0, cnt);

}
}
byteArrayOutputStream.close();
} catch (Exception e) {
System.out.println(e);
System.exit(0);
}
}
}

private AudioFormat getAudioFormat() {
float sampleRate = 8000.0F;

int sampleSizeInBits = 16;

int channels = 1;

boolean signed = true;

boolean bigEndian = false;

return new AudioFormat(sampleRate, sampleSizeInBits, channels, signed,
bigEndian);
}

class PlayThread extends Thread {
byte tempBuffer[] = new byte[10000];

public void run() {
try {
while (in.read(tempBuffer) != -1) {
sourceDataLine.write(tempBuffer, 0, 10000);
}
} catch (IOException e) {
e.printStackTrace();
}
}
}

}



106 comments:

Florentin said...

Hi,

I'm trying to get this code to work ... no luck so far.

I'm having big trouble with the for block in captureAudio().

Could you send me or post the .java file ?
My email is flo att derherold dott com

BIG THX

Flo

Arun said...

Download Source Files :
http://www.live-share.com/files/199043/revoicechatusingjava.zip.html

DJ said...

plz send me the complete code of this file thanks

Anjana said...

thanx alot. your code works really fine. but there is a bit lag in the audio. also there is echo. thanx again. it was a great help to us.

bhavin said...

hi
please i need code too

above sender class having some problem in for loop
please give me link
or mail me on kiteand@yahoo.com

sympsons said...

Hello,

I have been trying to get the code work, but had no luck. I would appreciate if you could send me a copy of the code to
sympsons07@hotmail.co.uk

Kind regards
sysmpsons

Anonymous said...

plz send me the CODE!!
doom_marine@hotmail.com

bhavin said...

hi
i did run your voice chat program on diffrent pc
but reciver is having folling exception when i run Tx after running sender
exception is as follow


javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 8000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian not supported.

Arun said...

hi bhavin
i think ur pc mic driver problem .so first test ur mic using below AudioTest.java

http://javaorigin.com/resource/AudioTest.java

said...

plz send me the complete code of this file, the link is not avaible :( thanks

uscream80@hotmail.com

Anonymous said...

hi! could you pelase send the code?
thank you!
gloriabrandao@hotmail.com

Samaratine said...

Hi,
could you please send the source code to me also. My id is joecleetus@gmail.com

T.A
Joe

Arun said...

Download Source

http://javaorigin.com/source/revoicechatusingjava.zip

Charli said...

Charli
Hi,
I got this code and i implement it, and i got the output. I execute it in JCreator pro 4.50 and JCreator LE

so said...

I don't understand this code well, I mean I don't know which is server or client.
I'd like to send the code that clients communicate voice with each other as same as skype.

sandy said...

hi,
i dont know how to work with this code can u plz send me the .class file

my maid id is vvsandeepmca@gmail.com

sandy said...

hi,
i dont know how to work with this code can u plz send me the .class file

my maid id is vvsandeepmca@gmail.com

sandy said...

plz send me the.class file to my id vvsandeepmca@gmail.com

Anonymous said...

Great !!! Thank you man !!!

Islam El-Naggar said...

thanks for ur nice article, but did u think is there a performance difference between both JMF And ur code

Anonymous said...

Thx for the code.. But, I still don't
understand to execute that. Can you show me the tutorial sir?
regards

Gege said...

Could you send me a sample implementation? Because i could not use it :(

my email: gege1985 at freemail.hu

ty m8

Anonymous said...

Hi,
i downloaded the source code and i compiled the java files using Jcreatorpro and worked fine.But i when i run the class files i get messages like

Connection established at localhost:9000
java.lang.NoClassDefFoundError: org/multichat/server/ChatServer
Exception in thread "main"
Process completed.

so wat does this mean????

i a newbie in java,cud u plz help me out.

thanks a mil..

vijay said...

hi i am new to java... i am doing small project.... voice chat... wheather this pgm will work in LAN.. pls help out... thanks!!!!

Anonymous said...

Thatz Gud work done i have sucessfully executed the program. but there's a bit of lag in the voice can we adjust it. Any suggestions.Thankz for the code.

Laxmikanth said...

Any idea on how to write code
for Sipx client as a soft phone to enable voice chat using userid's of sipx.

Arpith said...

sir

my name is arpith
i wanted code for a server centric chat program ,all clients voice chatting through a dedicated server

please send the source code to my mail id arpith.patil@gmail.com

Arun said...

hi arpith
dont do like that . it ill create more load for server and terrible network traffic . server is only for initiate and connect (point to point) the call between two client. thats all . (ex: gtalk ,yahoo,all SIP enabled voice applications )

Anonymous said...

does it require any other hardware other than headphone with mic

Anonymous said...

only mic and headphone is enough

Asif said...

I have used your code works well on Pc having Headphone and speaker. But I want to deploy it over server (which does not even have a sound card) so that many clients can have a voice chat like skype. when i upload the code on the windows server it gets stuck on the function

private void captureAudio() {...
Mixer.Info[] mixerInfo = AudioSystem.getMixerInfo();


can you please guide what can be done. thanks

Anonymous said...

hi Asif
this program minimum requirement
is at least one sound card and microphone

priya said...

I dont know how to execute these files.. Which compiler should i use..? How should i execute with normal java program..?

vaishu said...

I dont know how to execute these files.. Which compiler should i use..? How should i execute with normal java program..?

Fabiano said...

hi, could you send the code?
tks

fabianocruz@yahoo.com.br

Anonymous said...

hi, im new to java. i tried to compile with "javac Tx.java" and then "javac sender.java" and 2 .class files are produced but when i try to run them with "java sender" i get an error message "Exception in thread "main" java.lang.NoClassDefFoundError: sender (wrong name: n
et/sender)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: sender. Program will exit."

any help ?

mohan said...

hai,

This is mohan,i excuted ur voice chat program but it is raising the
execption i.e.,

"java.net.connectException;connection refused: connect"

plz send me solution and give me executable code.

Thanking you,

Mohan.

rukmini said...

that program has compiled successfully,

first i am running sender.java in one pc and i am running Tx.java in another pc.

when i run sender.java ,ie in running mode (no output)
when i run Tx.java after some i am getting "java.net.connection Exception:timed out"

what is the solution for this problem.

i need source code for multiple clients should communicate through voice chat.

mail id is rukmini.mca2007@gmail.com
plzzzzz urgently help me.

Anonymous said...

Hi Arun,
thank a lots,your code works fine,but i have a problem to stop this.Can u tell me how to stop?
my Email vietkiem2004@yahoo.com
my name's quoc Viet.
thanks

Sandun Lewke Bandara said...

can it be use this application over the internet(instead of LAN)?? (i mean Peer-to-peer voice chat like Gtalk)

i want to create a Java desktop swing application for Voice chat. any suggestions?can any body help me to make success this app?

Anonymous said...

Hi,

i want to create a Java desktop swing application for Voice chat. can any one post the code.

vadalisudheer@gmail.com

rajesh said...

can anyone send the code for voice chat in java... please....... my mail id is:aarya_ch2000@yahoo.co.in

guru said...

hi this is guru , i used this software and found some errors, can u please provide the materials and details of this source code implementation .

guru said...

hi this is guru plz send the implementation materials of this source code to me at pai.gurunath@gmail.com

Hardik said...

Thanks to developer of this code.

Your code helps me lot.

Once again thanks.

بشرى مصطفى أبو خرج said...

Hi
please i need the comments of your code cuze i am a student and i need to learn this code
pleas can you help me ???
thanks alot ....

Max said...

Dude excellent work!!

Anonymous said...

thank you, it's work for me so far...

first, u run sender.java, and then u run Tx.java.

change the 192.168.1.111 :
//sock = new Socket("192.168.1.111", 500);

into your io destination.
for example, i am using "localhost", so that when i record my voice, i hear my voice again.

ex :
//sock = new Socket("Localhost", 500);

that's all.
thx you very much!

krishna said...

wow very nice code it helps me a lot in my project

thanks a lot

krishna

Yusuf said...

Would this work in J2ME for mobile development?

Anonymous said...

I m trying 2 execute this code...but no luck so far...... its time wasting to work on this code. Sanju Mahawar

c1oUd said...

remember to run it using the package name:

"javac sender.java" outputs 2 files:

sender.class
AND
sender$CaptureThread.class

both files need to be in a directory named "net"

| sender.java
| Tx.java
|
+---net
| sender$CaptureThread.class
| sender.class
|
\---sound
Tx$CaptureThread.class
Tx$PlayThread.class
Tx.class

to run the clases use:

"java net.sender" AND
"java sound.Tx"

Ankita said...

Hi....
ur code has compiled successfully bt when i execute sender file it gives thi error:
message "Exception in thread "main" java.lang.NoClassDefFoundError: sender (wrong name: n
et/sender)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: sender. Program will exit."

what to do??
help??

hossam said...

thank you for the code, can you please tell me how to make this code work. please reply on hsaad8@gmail.com

Anonymous said...

Who knows where to download XRumer 5.0 Palladium?
Help, please. All recommend this program to effectively advertise on the Internet, this is the best program!

Sarwar said...

run:
Available mixers:
Primary Sound Driver
Speakers (IDT High Definition Audio CODEC)
Digital Output Device (HDMI) (2- High Definition Audio Device)
SPDIF - HP Dock (IDT High Definition Audio CODEC)
Speakers (Bluetooth Hands-free Audio)
Dual Headphones (IDT High Definition Audio CODEC)
Primary Sound Capture Driver
Microphone Array (IDT High Defi
Headset Microphone (Bluetooth H
External Mic (IDT High Definiti
Stereo Mix (IDT High Definition
Java Sound Audio Engine
Port Speakers (IDT High Definition A
Port Digital Output Device (HDMI) (2
Port SPDIF - HP Dock (IDT High Defin
Port Speakers (Bluetooth Hands-free
Port Dual Headphones (IDT High Defin
Port Headset Microphone (Bluetooth H
Port External Mic (IDT High Definiti
Port Microphone Array (IDT High Defi
Port Stereo Mix (IDT High Definition
java.lang.IllegalArgumentException: Line unsupported: interface TargetDataLine supporting format PCM_SIGNED 8000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian
BUILD SUCCESSFUL (total time: 1 second)

غازي دغمش said...

this code is outputing:
Available mixers:
Primary Sound Driver
Speakers (High Definition Audio Device)
Digital Output Device (SPDIF) (High Definition Audio Device)
Primary Sound Capture Driver
Microphone (High Definition Aud
Java Sound Audio Engine
Port Speakers (High Definition Audio
Port Digital Output Device (SPDIF) (
Port Microphone (High Definition Aud

java.net.SocketException: Software caused connection abort: socket write error


can u please help with this exception ....

how can write an applet out of this

Anonymous said...

salam namaste n hi 2 every one
can any one plz help me sendindg a code for captre voice throgh headfones and send it to a specfic ip in pure java.
Great regargz Arman

Tanay said...

hey i executed u r code but it gives the followin error

run:
Available mixers:
Primary Sound Driver
Speakers (IDT High Definition Audio CODEC)
Digital Output Device (HDMI) (2- High Definition Audio Device)
SPDIF - HP Dock (IDT High Definition Audio CODEC)
Speakers (Bluetooth Hands-free Audio)
Dual Headphones (IDT High Definition Audio CODEC)
Primary Sound Capture Driver
Microphone Array (IDT High Defi
Headset Microphone (Bluetooth H
External Mic (IDT High Definiti
Stereo Mix (IDT High Definition
Java Sound Audio Engine
Port Speakers (IDT High Definition A
Port Digital Output Device (HDMI) (2
Port SPDIF - HP Dock (IDT High Defin
Port Speakers (Bluetooth Hands-free
Port Dual Headphones (IDT High Defin
Port Headset Microphone (Bluetooth H
Port External Mic (IDT High Definiti
Port Microphone Array (IDT High Defi
Port Stereo Mix (IDT High Definition
java.lang.IllegalArgumentException: Line unsupported: interface TargetDataLine supporting format PCM_SIGNED 8000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian
BUILD SUCCESSFUL (total time: 1 second)


can u uoy give any sugeestions ???

Tanay said...

hey i get this error

run:
Available mixers:
Primary Sound Driver
Speakers (IDT High Definition Audio CODEC)
Digital Output Device (HDMI) (2- High Definition Audio Device)
SPDIF - HP Dock (IDT High Definition Audio CODEC)
Speakers (Bluetooth Hands-free Audio)
Dual Headphones (IDT High Definition Audio CODEC)
Primary Sound Capture Driver
Microphone Array (IDT High Defi
Headset Microphone (Bluetooth H
External Mic (IDT High Definiti
Stereo Mix (IDT High Definition
Java Sound Audio Engine
Port Speakers (IDT High Definition A
Port Digital Output Device (HDMI) (2
Port SPDIF - HP Dock (IDT High Defin
Port Speakers (Bluetooth Hands-free
Port Dual Headphones (IDT High Defin
Port Headset Microphone (Bluetooth H
Port External Mic (IDT High Definiti
Port Microphone Array (IDT High Defi
Port Stereo Mix (IDT High Definition
java.lang.IllegalArgumentException: Line unsupported: interface TargetDataLine supporting format PCM_SIGNED 8000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian
BUILD SUCCESSFUL (total time: 1 second)


can u give any suggestions ???

Sam said...

where can i get code for multiclient audio chat.....pls its urgent....

Anonymous said...

Hi,

I'm trying to get this code to work ... no luck so far.

Could you send me a full copy file. My email ljowen985@hotmail.com

Anonymous said...

hi there,

I am trying to integrate this with RTP and RTCP. though still couldnt get it work. Could you please send me the .java file...? thanks in advance. My Email is prasamya@gmail.com

r!n@ said...

hi!!! i m rina,my project is video conferencing using java.. still i have implemented text chatting but i dont know how to send audio and video files using java

Parv Shrma said...

I 'll appreciate if you forward the code at parveensharma79@gmail.com

Regards,
Parv Sharma

Anonymous said...

HI,
Does this program sending voice over UDP or TCP?

I am looking for the code that captures the voice from a microphone and transmits over UDP to another computer ( only one way communication)

Thank you

anjali said...

Hi Arun,
We are working on a project that would require Voice Chatting, your source code having two files called sender.java and Tx.java are compiling but as I run it , it is giving exception as:
Available Mixers: Java Sound Audio engine
MicroSoft Sound Mapper
etc..

So do i need to update to the required mixers..I mean is this a list of mixers reqd to run the code.
KIndly reply on this id:
panjalisinghania@gmail.com

Thanks a lot.

Anonymous said...

does anyone know ho to change this source into java applet?please..i need this for my final project in campus

Anonymous said...

hye can u pls send me the source code on
jasleenkr28@gmail.com

Anonymous said...

Please help me.......

Can I use this code for Mobile such as J2ME application???????

ramakrishna said...

could u help me. i am trying on this code. but showing some errors. please send me working code.

my mail id is ramakrishna.gurukulam@gmail.com

Murali said...

Hi,
I am using this sender.java and tx.java. it is working fine.

Can u pls guide me how to increase the speed of the voice chat.

now i am getting 2-3 mins delay.

Thanks
Murali

Ninad Amkar said...

Nyc work keep it up...
Btw do d program hav gud performance...i mean on wide scale ???

Murali said...

Hi
It is working fine. But there is a delay in the voice. How to reduce the delay.

Pls help me...

parasvora1987 said...

hi,
i need full source code could you please send it to the following e-mail address:
paras.don@gmail.com
thnx in anticipation.

sanaa said...

please i need the full source code
this is my email
bozayna@gmail.com

akki said...

hello sir ur code helps a lot many of are still suffering from the executing problem
could u please provide the implementation video
we shall be highly greatfull to you sir...
"akshaysaxena323@gmail.com"

agileswaran said...

use downloaded coding other than copy and past the code from web page.
downloaded coding worked fine.

Ahmedrad said...

Hello .. I know this is really old but can you please send a documentation for this class .. because I'm bew to java and I really don't understand which functions to run !! plz help .. my e-mail is ahmedrad@gmail.com
thanks

or if you can direct me to any new classes for the same function that would be also great .. I'm trying to do a voice conferencing application !!

hi said...

can you please send me the complete code? thank you kaiser.wee90@gmail.com

hi said...

can you please send me the full code? thank you
kaiser.wee90@gmail.com

Anonymous said...

hello gentle men and madam, how do u do? is this project works? please tell me if it works well and if possible sent to me. i am working on video and audio Lan messanger.
thank you so much.
my email is: atsbha2008@yahoo.com

Android app development said...

This is one of the brilliant post.I like your blog conclusion.
Android app developers

samuel said...

please send me the full code be harry i need it with in 3 days
onesam44@gmail.com

Suthar Jay said...

hi,

This is Suthar jay

Above code run sucessfully but that is not work and client server environment

Like sending audio from server not getting at the client side

Plz help
if any correction in code

send me on suthar.jalaram@gmail.com

Android app developers said...

This is one of the valuable post.I like your blogging style.This is one of the significant post.

Java Help said...

Hi,
i'm akhtar,could u please mail me the process of runing the application.mi id is
akhtar.acet@gmail.com

Android app developers said...

This is one of the suspenseful post.i like your blog evolution.Thanks for share with us.

Aarti Malik said...

hi
I have been trying to get the code work, but had no luck. I would appreciate if you could send me a copy of the code to
amalik1724@gmail.com

Kind regards

jaspreet said...

when i run tx.java then this error vl occur....
Available mixers:
PulseAudio Mixer
default [default]
NVidia [plughw:0,0]
NVidia [plughw:0,3]
Port NVidia [hw:0]
java.lang.IllegalArgumentException: Line unsupported: interface TargetDataLine supporting format PCM_SIGNED 8000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian
BUILD SUCCESSFUL (total time: 0 seconds)
plz help me frendzzzzzzz...

Rohit Porwal said...

I am also making a project similar to this......It is through hibernate and JMF......Basically it is project of Audio/Video/Text chatting.......text chatting is running but when I make a audio call to another user, a exception appears.....

java.lang.IllegalArgumentException: Line unsupported: interface TargetDataLine s
upporting format PCM_SIGNED 8000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian

please give me a solution as soon as possible....otherwise my project may be cancelled....

kilsoo Yoon said...

hi, could you send the code?
tks...

kilsoo Yoon said...

plz send me the CODE!!

kilsoo1124@gmail.com

Arjun said...

Hi! Thanks for the code! Works perfectly well!
My problem though is that I need it to work both ways. Any solution possible?

Anusha challu said...

Can anyone please tell me how to run these java files and what all software and hardware equipment is needed..

Im really in a very urgent need of this project....hope some one could answer me..

Thanks in advance!!!

Anusha said...

Can anyone please tell me how to execute these java files and what all software and hardware equipment is needed to execute successfully..

I really need it very urgent...someone please reply soon

Thanks in advance

Anusha said...

Hello when i run these two java files im getting connection timed out exception...

how to work with this...please some one send tutorial to my id

san_anusha5@yahoo.com

Thanks inadvance!

Anonymous said...

hey.. even m trying this code.. can u pls tell me how shud i give input.. i complied the code..but no idea how shud i start with execution..


jst by pluging in d headphones.. chat l start or need to do sumthing else..

Sachin Rao said...

can you please send me the source code and execution details
my email id: sachinraobr@gmail.com

CoolPics said...

Thankxxx Buddy :)
If u r having it for full Duplex communication, then mail me on ani.coder@outlook.com

Onkar said...

Plz Reply to this
I require java code for audio chat as a small project in my college,so i require the code badly

Anonymous said...

i need the source code for college project ,plz mail me on ominarkar@gmail.com

rocel said...

Hi,
I know this post is kinda old, but thanks for you code, this is very nice, but I can not make it work:
The *for* loop of the methods *captureAudio()* is strange and don't know how to correct it.

The links to download the source are dead, could you please send to me a whole working project at the address :
rocelcode@yahoo.com

thanks

Rocel

Anonymous said...

Hi,
I know this post is old, but thanks for you code, this is very nice, but I can not make it work:
The *for* loop of the methods *captureAudio()* is strange and don't know how to correct it.

The links to download the source are dead, could you please send to me a whole working project at the address :
tiagoreginato@bol.com.br

thanks

Tiago

Anonymous said...

Hi,
I know this post is old, but thanks for you code, this is very nice, but I can not make it work:
The *for* loop of the methods *captureAudio()* is strange and don't know how to correct it.

The links to download the source are dead, could you please send to me a whole working project at the address :
tiagoreginato@bol.com.br

thanks

Tiago

Quinn Finney said...

What the hell are those for loops? With all those quotes and everything it can't possibly do ANYTHING. How am I supposed to get this to run?