Voice chat not working.

Hello,
I was just trying the code given in JMF documentation for voice chat. When i ran the below given code, it doesn't throw any error but after running this program when i speak anything into my microphone i am unable to hear anything. What can be the problem?
package sendmicrophonedata;
import java.io.IOException;
import java.util.Vector;
import javax.media.CaptureDeviceInfo;
import javax.media.CaptureDeviceManager;
import javax.media.DataSink;
import javax.media.Manager;
import javax.media.MediaLocator;
import javax.media.NoProcessorException;
import javax.media.NotRealizedError;
import javax.media.Processor;
import javax.media.control.FormatControl;
import javax.media.control.TrackControl;
import javax.media.format.AudioFormat;
import javax.media.protocol.ContentDescriptor;
import javax.media.protocol.DataSource;
public class Main {
     * @param args the command line arguments
    public static void main(String[] args) {
       // First find a capture device that will capture linear audio
        // data at 8bit 8Khz
        AudioFormat format= new AudioFormat(AudioFormat.LINEAR,
                                            8000,
                                            8,
                                            1);
        Vector devices= CaptureDeviceManager.getDeviceList( format);
        CaptureDeviceInfo di= null;
        if (devices.size() > 0) {
             di = (CaptureDeviceInfo) devices.elementAt( 0);
        else {
            // exit if we could not find the relevant capturedevice.
            System.exit(-1);
        // Create a processor for this capturedevice & exit if we
        // cannot create it
        Processor processor = null;
        try {
             processor = Manager.createProcessor(di.getLocator());
        } catch (IOException e) {
            System.exit(-1);
        } catch (NoProcessorException e) {
            System.exit(-1);
       // configure the processor
       processor.configure();
       // block until it has been configured
       processor.setContentDescriptor(
           new ContentDescriptor( ContentDescriptor.RAW));
       TrackControl track[] = processor.getTrackControls();
       boolean encodingOk = false;
       // Go through the tracks and try to program one of them to
       // output gsm data.
        for (int i = 0; i < track.length; i++) {
            if (!encodingOk && track[i] instanceof FormatControl) {
            if (((FormatControl)track).
setFormat( new AudioFormat(AudioFormat.GSM_RTP,
8000,
8,
1)) == null) {
track[i].setEnabled(false);
else {
encodingOk = true;
} else {
// we could not set this track to gsm, so disable it
track[i].setEnabled(false);
// At this point, we have determined where we can send out
// gsm data or not.
// realize the processor
if (encodingOk) {
processor.realize();
// block until realized.
// get the output datasource of the processor and exit
// if we fail
DataSource ds = null;
try {
ds = processor.getDataOutput();
} catch (NotRealizedError e) {
System.exit(-1);
// hand this datasource to manager for creating an RTP
// datasink our RTP datasimnk will multicast the audio
try {
String url= "rtp://192.168.1.255:8888/audio";
MediaLocator m = new MediaLocator(url);
DataSink d = Manager.createDataSink(ds, m);
d.open();
d.start();
} catch (Exception e) {
System.exit(-1);

LaalaPanchal wrote:
Hello,
I was just trying the code given in JMF documentation for voice chat. When i ran the below given code, it doesn't throw any error but after running this program when i speak anything into my microphone i am unable to hear anything. What can be the problem?Why exactly are you expecting to hear anything? You don't have anything in your code to render sound, so why're you expecting it to?

Similar Messages

  • Voice chat for LAN Working :) ,  but For Internet Voice Chat Not Working

    Hi, all I have developed voice chat for lan , but when i try to connect to internet it doesn't working. Pls let me know the reason why is it so?
    I am behind the Firewall and firewall doesn't allow me to connect to server or transmit RTP data to the another User. Why is it So. Please Reply As Soon As Possible!!!!

    That's exactly what i am talking about. Your IP address is private. Means, it is not routable outside your organization. Means, that you cannot receive anything from outside, because technically this private address does not exist outside your network.
    However, you might be able to send audio to someone outside who has public IP address (PLEASE, read up about private and public IPv4 addresses and NAT in order to understand what your problem is. Just one Wiki page that you can dig up in Google.com).
    Now you simply cannot use your chat from inside your organization to chat with outside people. It will not work. You need public IP addresses in both ends (i.e. you and remote party) + firewall rules must allow UDP traffic for certain ports, that your program uses.
    If you want to overcome private addressing problem manually, i dont know how to do it. But what i know for sure is that it would be painful. My application that i made uses a VoIP server (SIP server and an RTP proxy server). These servers do private address handling (NAT handling) for my audio/video streams.
    You have an option though. Go to your network admin and lick his/her brain. Ask for a public IP address (they might have some in reserve). Do the same thing at the remote end.

  • Video & Voice Chat Not Working With ichat

    Voice Chat and Video Chat is not working with ichat 6 in booth google and yahoo. One side is ichat and the other side is yahoo & google talk clients, Please confirm whether its a workable scenario or it only supports ichat to ichat.
    Thanks & Regards
    Sreejith R

    Hi
    Other alternatives based on the amount of info in your post.
    Has she set up her Google Name in iChat or is she logged on via the Web Site (Google Mail page) ?
    iChat cannot Video to the Google Mail Login page chat option or to the app called GoogleTalk on a PC.
    Another thing.
    If you login to the GoogleMail Web pages you will get logged out of iChat (GoogleTalk account) to a partial extent which may explain the loss of Video or Audio iCons.
    iChat reports in a Text chat window that you have Logged Off.
    However you seem to be able to continue the chat - but it separate from the web Page chat - You send from the web page and that chat will get the next response, send from iChat and it gets the next response (I can't remember if the Buddy told me he got two Chat windows at his end)
    9:26 PM Wednesday; May 12, 2010
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"

  • IPhone 2G voice mic not working

    Has anyone come across iPhone 2G voice mic not working (not being heard by the other person) but works fine on speaker phone and bluetooth headset. It has been working fine so far and suddenly developed this problem! Any help is highly appreciated….

    I had that problem with my iPhone 3G after about 5 days.
    I just had Apple take a look at it.
    They cleaned it out, called it and stuff.
    Didn't work.
    Since I didn't drop it in water and it was not my fault in any way, they gave me a brand new one.

  • When streaming a movie with the new Apple TV, and using a DSL Internet connection, all audio sound works, e.g., the music track, but the audio track with the actor's voices, does not work. What can I do?

    When streaming a movie with the new Apple TV, and using a DSL Internet connection, all audio sound works, e.g., the music track, but the audio track with the actor's voices, does not work. What can I do?

    Hi Brian,
    Thanks restoring and restarting didn't fix my problem - i have started it fresh and still it doesn't work. Basically I press ONCE on the remote, after the machine has not had any commands for 10 minutes, and the cursor skips from one end of the menu to the other - so I can't choose network or update software etc - I sometimes manage to stop it randomly in the middle of the menu if I press on a command in the middle of the cursor skipping all the menu steps...not sure what the problem is but I have basically not used my brand new apple tv since I bought it for that reason! I should call Apple support I suppose! grrrr hate wasting time with stuff like this!
    Thanks for your help though!
    Pernille

  • Google Voice Widget Not Working in Safari 5.1 which is Adobe flash wmode transparent based

    Google Voice Widget Not Working in Safari 5.1 which is Adobe flash with wmode transparent set. For that matter all flash text fields in Safari 5.1 are not working accross the web when wmode is set to transparent. This is a Safari bug! Other browsers work fine.
    Well after much research Adobe flash text field with wmode transparent set is not working in Safari 5.1 when any flash object has the wmode set to "transparent", or "opaque". The problem is many site must layer flash objects with html so the wmode transparent must be used.
    Affecting sites like BEST BUY, WALMART, CVS, STAPLES, Chechout their flash based weekly ads and find one that you need to update the quantity in the flash pop-up and the text field with keyboard strokes will not work. Flash text fields were all working fine until several month ago when Safari rolled out 5.1 working for Google Voice Flash based widget which uses the wmode transparent. HELP!
    John Hooper
    Techno Online Problem Solver
    http://www.johnrhooper.com

    All 3 examples seem to render just fine in IE and FF.
    See comparison photo:
    http://www.cidigitalmedia.com/web_devel/background.jpg
    If not working for you, try clearing your cache to remove any old, non working versions.
    Test on some other machine besides yours.
    Code looks fine and seems to work.
    Best wishes,
    Adninjastrator

  • Webcam not working for Macbook Air 2013 after upgrading to OSX Mavericks? Yahoo/ Google/Skype cam chats not working. Facetime works though. Any updates of Mavericks released to fix this?

    Webcam not working for Macbook Air 2013 after upgrading to OSX Mavericks? Yahoo/ Google/Skype cam chats not working. Facetime works though. Any updates of Mavericks released to fix this?

    I have a MacBook Pro Retina display: 15.4-inch late 2015 with OS X Mavericks install, only on second week. 
    Insight works on FaceTime, Skype, but yahoo program does not show insight cam in dropped down.
    Now when I got my new MacBook Pro, I down loaded all new Skype (worked tested), FaceTime (Worked Tested), Yahoo (not worked)
    Fix:
    With the new Maverick you have to use there messager program Version 8.0 (4218). Once I add my yahoo account video works again.
    It also supported AOL, AIM, Google Talk, Jabber.
    Guess I miss it frist time... hope this helps...

  • Anyone have a fix for Facebook video chat not working in Mavericks?

    I have seen many people having the problem of video chat not working in Facbook since upgrading to Mavericks. The good news is the camera icon has reappeared, but it still is not working.
    Any help would be AWESOME!!
    thx

    Hi,
    If it is in Messages it will need to be Messages to Messages.
    i.e. a Mac Buddy also using iChat or Messages to do Jabber Video chats in the app.
    This means it will not connect to someone using a Jabber app that can do Video or the web Page login and using "chat" from there.
    I believe the Web Browser method with Facebook's own end to end connection use Flash.
    You may need to update a version of Flash if your have it or install it if you do not.
    FaceTime would not connect to the Jabber connections that Facebook is running.
    FaceTime is it's own service and does not connect to others.
    Messages and FaceTime are run on different servers and you can in fact run different IDs in each.
    (this can causes issues when your Invoke a FaceTime Video Chat from Messages which presumes the Contact is using the same ID).
    8:51 pm      Thursday; December 12, 2013
      iMac 2.5Ghz 5i 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Chat not working after nokia C3-01 software update...

    Chat not working after nokia C3-01 software update from 5.65 to nokia 6.00

    when is there's gonna this be fixed it has been more than a month
    satisfaction level is decreasing with the product

  • HT5429 navigation voice is not working

    Navigation voice is not working.

    What's the reason you think the JSP <jsp:scriptlet> tags works in JSF?
    CM.

  • Yahoo messenger voice chat stopped working (after archive & install)

    I have an iMac5 Intel Core 2 Duo 2.16 GHz. I (actually my wife) was using Yahoo Messenger v3.0 beta 4 (built 156957) for all chat and voice chat. About 2 months ago voice chat stopped working. when i send invite, it keeps ringing (but the receiver never sees any invite). When the other person sends me an invite, I don't get anything.
    I have downloaded Gizmo, but it also keeps "connecting...".
    About 2 months ago, I had to archive and install to solve a Java update issue which was causing wierd problems. Thanks to BDAqua's advice I managed to resolve that. I have J2SE 1.4.2 and 5.0; everything else is working fine.
    What can cause voice chat to stop working? Is there some vc plugin in library that needs to be there, which has disappearted after my "archive and install'? Please advise. thanks Fahd

    Hi again Fahdali,
    Have you tried reinstalling it since then?
    http://www.apple.com/downloads/macosx/email_chat/yahoomessengerformac.html
    Or...
    http://wiki.answers.com/Q/CaniChat_be_used_with_yahoomessenger

  • Group chat not working on Mac

    Suddenly stopped working, but personal messages works. Had to login via skype for web and that's where I saw that I had tons of group messages. Tried updating Skype to latest version (7.10), restarted several times, to no avail.  Group Chat is still dead. 

    The same here. Group chats not working, and some 2-person chats not working too.

  • IChat video chat not working ANYMORE-can see friends, but they can't see me

    My built-in iSight camera is working. Photobooth works fine. My iChat used to work perfectly, video and all. But starting two nights ago, when I bring up a video chat screen with anyone, the picture preview of me freezes and the person I am talking with can't see anything. Not even a blank screen comes up for them; they can only hear my voice. But oddly, I can see that person and hear them as well. It's just the visual part that isn't working.
    Under Preferences on iChat, "Automatically open iChat when camera is turned on" is checked. So is, "Play repeated ring sound when invited to a conference." Bandwidth Limit: None. Microphone is set to "Internal microphone." Now, the preview screen works and shows me moving. But as soon as I bring up a video chat with someone, this screen freezes the picture (if I keep it open while opening video chat). Or, if I close it and then bring up a video chat, and bring up Preferences, the screen is black.
    This is very odd because iChat used to work fine with video chat, but all of a sudden it is not working at all. Please let me know if you have any idea what I can do to fix it. Thanks.

    lemke,
    You posted in your own thread that you have a Thomson-Alcatel Speedtouch modem.
    Yours is likely to be a different problem.
    2:27 PM Saturday; December 29, 2007

  • IPhone 4 Voice Memos not working/saving

    Hi there,
    I'm having trouble with my voice memos too. Up until yesterday they were working fine and now, even though the record button works, the stop button does not and I can only pause them. Worse again is that the button to go into the menu to view all voice memos is not working so I can't play them from my iPhone and nothing new is saving to my iTunes. Please help!

    I've always had the "Include Voice Memos" option selected. I think that only pertains to syncing voice memos from iTunes to the iPhone after it has been copied to iTunes. It has to be the new OS/iTunes not communicating that new memos have been recorded. For some reason they won't sync when I want them to, and then a few syncs later they magically appear.
    By the way, I'm VERY comfortable with the iTunes and iPhone systems. I've been using iTunes for 5 years, and I've been recording class lectures with the iPhone voice memo app (and another app) for a couple years. It's not an error of not seeing that the memos were added; they don't exist in my library or music folders.
    JUST OUT OF CURIOSITY, POST WHICH FIRMWARE YOU ARE RUNNING EXACTLY!!!
    I'm on an iPhone 4, running firmware 4.0.1

  • Live! Cam Voice (mic not working)

    Just bought Live! Cam Voice yesterday. Mic still not working properly even after verifying the installation. Please advise how to rectify.
    Thanks,

    Hi,
    Is there any chance you could upload the drivers from the cd for me please because creative dont currently support the camera.
    I can give it a trial run on my windows xp and give you some feed back after.
    Thanks,
    Rav

Maybe you are looking for