Capturing audio on iPAQ with java

Hello,
Does anybody know a method of capturing audio data from the built in microphone on the iPAQ using java?

Hello,
Does anybody know a method of capturing audio data from the built in microphone on the iPAQ using java?

Similar Messages

  • Capturing audio through applet using Java Sound

    hi fellows i need ur help.
    I am working on a voice project to Capture & Play the sound using java sound API instead of JMF. I can capture , play and transmit the sound through application. It works pretty fine but when i convert it to the applet, it is not working.
    I got the full system permissions and also signed the applet for Internet Explorer. Also i packed the
    javax.sound.midi.*
    javax.sound.sampled.*
    classes in the signed cab.
    After doing all this i am getting the AudioFormat not supported exception. I changed the format and used all the combinations but still getting this error
    No line matching interface TargetDataLine supporting format PCM_SIGNED, 16000.0 Hz, 16 bit, mono, big-endian, audio data is supported.
    java.lang.IllegalArgumentException: No line matching interface TargetDataLine supporting format PCM_SIGNED, 16000.0 Hz, 16 bit, mono, big-endian, audio data is supported.
         at javax/sound/sampled/AudioSystem.getLine (AudioSystem.java:312)
         at com/vsoft/voice/VoiceRecord.run (VoiceApplet.java:93)
         at java/lang/Thread.run (Thread.java)plz help me to sort out this problem.

    plz have a look over this problem

  • J2ME MMAPI: capture audio in AMR with given bitrate

    Colleagues,
    I'm facing issue while trying to record audio in AMR. While I successfully record audio in AMR 12.2 kbps I can not change the bitrate. It is always 12.2 kbps regardless of what I specify in media locator string.
    Could anybody help me to figure out what parameters should I specify to record audio, for example, in AMR 4.75 kbps?
    Thank you in advance.

    The code is:
    String uri = "capture://audio?encoding=amr&rate=8000&bits=16";
    // Get player object
    _player = Manager.createPlayer(uri);
    _player.realize();
    // Get Record Control to be able to record audio
    RecordControl  rc = (RecordControl)_player.getControl("RecordControl");
    // Set destination file
    rc.setRecordLocation(rec_file);
    // Begin recording from standard input
    rc.startRecord();
    // Transfer audio from microphone to standard input
    _player.start();Actually AMR bitrate depends on the size of frame which repeats each 20 ms. For 4.75 kbit/s frame is 95 bits long.
    I'm not sure how to specify this by 'rate' and 'bits' parameters. I already tried some combinations but in vain. The default for my Motorola Z3 is 12.2 kbit/s. Maybe it even does not support capturing in other bit rates (I'm not sure), though it is able to play AMR files of other bit rates.
    Maybe you can point me to the emulator which supports AMR capturing in different bit rates?
    Thank you for interest in my question.

  • How can I capture Audio Only?

    Hello,
    I have FCEHD 3.0 and would like to capture audio tracks only with Capture Now (from a non-controllable device via Canopus). There is no "Audio Only" option in the capture window. Any ideas??
    Thanks,
    C.J

    Hi(Bonjour)!
    No way to capture audio only with capture command.
    Simply delete the video track in the timeline.
    Or:
    Plug your camcorder audio output in your in-line socket on your mac with an audio 1/8" wire, do a voice over record.
    The resulting audio file will be a "analog" one.
    You can also use a sound editing programm like Sound studio or audacity to capture your audio-in content, and import the resulting file in FCE.
    Michel Boissonneault

  • Audio capture delayed with Java Sound and JWS

    Hi.
    I am experiencing quite a strange problem with Java Sound in my Java Web Start application. I am acquiring sound from the microphone through Java Sound, using a code which looks like this:
    ==============================
    AudioFormat audioFormat = new AudioFormat(11025, 8, 1, true, false);
    // Get a TargetDataLine from the appropriate mixer
    DataLine.Info dataLineInfo = new DataLine.Info(TargetDataLine.class, audioFormat);
    TargetDataLine targetDataLine = (TargetDataLine) AudioSystem.getLine(dataLineInfo);
    // Prepare the line for use
    targetDataLine.open(audioFormat);
    targetDataLine.start();
    targetDataLine.addLineListener(myLineListener);
    // Build an input stream from the line
    AudioInputStream audioInStream = new AudioInputStream(targetDataLine);
    // Create the output file
    File outputFile = new File("C:\\MySampleAudioFile.wav");
    // Start the actual audio file-writing operation
    AudioFileFormat.Type targetFileFormatType = AudioFileFormat.Type.WAVE;
    AudioSystem.write(audioInStream, targetFileFormatType, outputFile);
    ==============================
    This code is executed in an independent thread. As you can see from the code reported above, I add a LineListener to my TargetDataLine.
    The problem is that in my JWS application several seconds (about 5-6 seconds) elapse from the call to AudioSystem.write() and the reception of the START LineEvent on my LineListener. This delay only occurs when my JWS application is downloaded from my public internet website, while it is not present when I test my JWS application on my local LAN server.
    It looks like the call to AudioSystem.write() causes some kind of network connection to the remote web server of the JWS app, and this operation takes some time. In fact, if I download my JWS app to my client from the public web server, then I disable all network connections on my client, then the START event is received immediately after the call to AudioSystem.write()... This is STRANGE, isn't it???
    Do you believe the call to AudioSystem.write(), or any other Java Sound call, may cause a network connection to the server from which the JWS application has been downloaded?
    A final addition to the above picture: I also have a "Java Applet" version of this application, which is exactly identical to the JWS version and uses the same exact code to do audio acquisition from the microphone. But, in this case the delay is not present, even when running the applet from the public web server!
    Any help / suggestion would be highly appreciated.
    Best regards,
    Marco.

    Hi
    Just Visit the following link and download sample source code for rtp in java
    http://javasolution.blogspot.com/2007/04/rtp-using-java.html
    if u want know basic simple java voice chat then visit
    http://javasolution.blogspot.com/2007/04/voice-chat-using-java.html

  • WTK SDK 3.0 for OSX problem with capturing audio, emulator

    Hello all,
    i'm installed the WTK SDK 3.0 for osx and everything works well. Some test applications also work.
    Now I'm trying to realize my project and get strange error.
    I want to capture some audio form the microphone. But when i do so the Emulator strikes with this error:
    javax.microedition.media.MediaException: Player cannot be created for capture://audio
    so i tried this: System.getProperty("supports.recording") and it returns false. But when i read over the specification of the WTK it says that it should support the Audio capturing. Is this error based on the implementation of the WTK on OSX or have some Windows users also the same problem?
    here is my implementation for the Audio recording:
    public void commandAction(Command comm, Displayable disp){
            if(comm==recordCommand){
                try{
                    p = Manager.createPlayer("capture://audio");
                    p.realize();
                    RecordControl rc = (RecordControl)p.getControl("RecordControl");
                    ByteArrayOutputStream output = new ByteArrayOutputStream();
                    rc.setRecordStream(output);
                    rc.startRecord();
                    p.start();
                    messageItem.setText("recording...");
                    Thread.currentThread().sleep(5000);
                    messageItem.setText("done!");
                    rc.commit();
                    recordedSoundArray = output.toByteArray();
                    p.close();
                } catch (IOException ioe) {
                    errorItem.setLabel("Error");
                    errorItem.setText(ioe.toString());
                } catch (MediaException me) {
                    errorItem.setLabel("Error");
                    errorItem.setText(me.toString());
                } catch (InterruptedException ie) {
                    errorItem.setLabel("Error");
                    errorItem.setText(ie.toString());
            } else if(comm == playCommand) {
                try {
                    ByteArrayInputStream recordedInputStream = new ByteArrayInputStream
                          (recordedSoundArray);
                    Player p2 = Manager.createPlayer(recordedInputStream,"audio/basic");
                    p2.prefetch();
                    p2.start();
                }  catch (IOException ioe) {
                    errorItem.setLabel("Error");
                    errorItem.setText(ioe.toString());
                } catch (MediaException me) {
                    errorItem.setLabel("Error");
                    errorItem.setText(me.toString());
        any help would be grateful!
    thx and greetings
    Edited by: nYmou on Jun 1, 2010 3:44 AM

    Note: This thread was originally posted in the [Sun Java Wireless Toolkit|http://forums.sun.com/forum.jspa?forumID=82] forum, but moved to this forum for closer topic alignment.

  • Capture audio with PDAs

    Hi,
    I'm developing an application for PDAs and Smartphones in which I have to integrate a voice recorder, so I'm working with MMAPI 1.1 . With the emulator the application works but on the HP iPAQ 5450 I get the error message "unsupported protocol" when I try to create the Player with "capture://audio" as parameter. I'm using the J9 virtual machine from IBM, and I have installed all the correct updates which refers to MMAPI.
    By reading on this forums I've known about applications like this on Nokia 60's series device.
    Is there anyone who has developed applications like this for other devices (especially PDAs)?
    On which device it works ?
    Thanks.

    GerrySA wrote:
    Is there anything like this when I am playing the guitar or singing through a mic and want to capture audio?
    -- Gerry
    Yes...
    Well, almost
    If you keep "Punch On The Fly" enabled, Logic is actually ALWAYS recording, although once you hit stop, that buffer is cleared.
    So the trick to this is, if you are playing along (guitar or voice), and you realize you should have recorded that take, simply hit RECORD, BEFORE you stop. You can then "peel back" the audio region (drag the left side of that short region you'll have when stopping what you were playing to hit the record button), and drag it to the LEFT. You'll see all the audio you were playing there.

  • Getting echo when capturing audio with JMF

    Hello.
    I have just downloaded JMF 2.1.1 and have cribbed one of the examples to produce an application that will capture audio input, process it and pass it straight to the speakers. However, I am getting echo, i.e. the input signal appears twice at the speakers, shifted by about half a second.
    Now, before you tell me that it is due to feedback from the speakers to the microphone, I must tell you that my audio signal is from a radio plugged into the mike socket of my PC, so there is no chance of any external feedback.
    Below is the code:
    import javax.media.*;
    import javax.media.protocol.*;
    import javax.media.control.*;
    import javax.media.format.*;
    public class ExampleClass2 implements ControllerListener {
         private Object waitSync = new Object();
    private boolean stateTransitionOK = true;
         private Processor proc;
         public ExampleClass2 () {
              MediaLocator locator = getLocatorByName ("JavaSound audio capture");
              try {
                   proc = Manager.createProcessor(locator);
                   proc.addControllerListener(this);
                   proc.configure();
                   waitForState (Processor.Configured);
                   proc.setContentDescriptor(null);
                   proc.start();
    //               waitForState(Processor.Started);
    //          proc.getGainControl().setMute(true);
              } catch (Exception ex) {
                   ex.printStackTrace();
                   System.exit(1);
    * Block until the processor has transitioned to the given state.
    * Return false if the transition failed.
    boolean waitForState(int state) {
         synchronized (waitSync) {
         try {
              while (proc.getState() != state && stateTransitionOK)
              waitSync.wait();
         } catch (Exception e) {}
         return stateTransitionOK;
    * Controller Listener.
    public void controllerUpdate(ControllerEvent evt) {
         if (evt instanceof ConfigureCompleteEvent ||
         evt instanceof RealizeCompleteEvent ||
         evt instanceof PrefetchCompleteEvent) {
         synchronized (waitSync) {
              stateTransitionOK = true;
              waitSync.notifyAll();
         } else if (evt instanceof ResourceUnavailableEvent) {
         synchronized (waitSync) {
              stateTransitionOK = false;
              waitSync.notifyAll();
         } else if (evt instanceof EndOfMediaEvent) {
         proc.close();
         System.exit(0);
         public static void main (String [] args) {
              ExampleClass2 two = new ExampleClass2();
    Now, the really interesting thing is that if I uncomment the lines that mute the processor, I get only a single signal out of the speakers. It appears as if there is some connection between the mike input and speaker output.
    Just to make sure, I tried this with JMStudio and got the same result. When I captured input, I got two signals output until I pressed the mute button, when I got one signal.
    I also get the same problem if I use a Player, rather than a Processor.
    I am running on Win95, JDK1.3.
    Any thoughts?

    i'm having the same problem. but i tried with teh audio property settings. and get resolved. wat solution u found? i would like to know how u solved your problem, plz let me know very soon.
    Thanks,
    Parth Pandya
    Hello.
    I have just downloaded JMF 2.1.1 and have cribbed one
    of the examples to produce an application that will
    capture audio input, process it and pass it straight
    to the speakers. However, I am getting echo, i.e. the
    input signal appears twice at the speakers, shifted by
    about half a second.
    Now, before you tell me that it is due to feedback
    from the speakers to the microphone, I must tell you
    that my audio signal is from a radio plugged into the
    mike socket of my PC, so there is no chance of any
    external feedback.
    Below is the code:
    import javax.media.*;
    import javax.media.protocol.*;
    import javax.media.control.*;
    import javax.media.format.*;
    public class ExampleClass2 implements
    ControllerListener {
         private Object waitSync = new Object();
    private boolean stateTransitionOK =
    ansitionOK = true;
         private Processor proc;
         public ExampleClass2 () {
    MediaLocator locator = getLocatorByName ("JavaSound
    d audio capture");
              try {
                   proc = Manager.createProcessor(locator);
                   proc.addControllerListener(this);
                   proc.configure();
                   waitForState (Processor.Configured);
                   proc.setContentDescriptor(null);
                   proc.start();
    //               waitForState(Processor.Started);
    //          proc.getGainControl().setMute(true);
              } catch (Exception ex) {
                   ex.printStackTrace();
                   System.exit(1);
    * Block until the processor has transitioned to
    d to the given state.
    * Return false if the transition failed.
    boolean waitForState(int state) {
         synchronized (waitSync) {
         try {
    while (proc.getState() != state &&
    & stateTransitionOK)
              waitSync.wait();
         } catch (Exception e) {}
         return stateTransitionOK;
    * Controller Listener.
    public void controllerUpdate(ControllerEvent evt)
    vt) {
         if (evt instanceof ConfigureCompleteEvent ||
         evt instanceof RealizeCompleteEvent ||
         evt instanceof PrefetchCompleteEvent) {
         synchronized (waitSync) {
              stateTransitionOK = true;
              waitSync.notifyAll();
    } else if (evt instanceof ResourceUnavailableEvent)
         synchronized (waitSync) {
              stateTransitionOK = false;
              waitSync.notifyAll();
         } else if (evt instanceof EndOfMediaEvent) {
         proc.close();
         System.exit(0);
         public static void main (String [] args) {
              ExampleClass2 two = new ExampleClass2();
    Now, the really interesting thing is that if I
    uncomment the lines that mute the processor, I get
    only a single signal out of the speakers. It appears
    as if there is some connection between the mike input
    and speaker output.
    Just to make sure, I tried this with JMStudio and got
    the same result. When I captured input, I got two
    signals output until I pressed the mute button, when I
    got one signal.
    I also get the same problem if I use a Player, rather
    than a Processor.
    I am running on Win95, JDK1.3.
    Any thoughts?

  • Monitoring audio in sync with video when capturing in FCP studio

    Is there a way I can monitor audio in sync with video when capturing in FCP Studio? I know you can plug headphones into your tape deck but that sound is not in sync with the video in the capture window due to time delay. I tried plugging the headphones into my Powerbook but could not get any audio coming through these, nor audio through the Mac's inbuilt speakers.

    The preview checkbox is ticked and the audio monitor indicates that sound is being picked up (the levels rise and fall) but I still can't hear anything! The audio/video sync on the external monitor is ok, but because there is a time delay between that and the video capture window, I can't use that as a reliable monitor for sound sync. If I could resolve the video sync problem there, then I could monitor the sound through the external monitor.

  • IT's possibile capture audio with JMF on Pocket Pc

    It's possibile capture audio with JMF cross-platform version on Pocket Pc?? Or how can it possibile on Pocket pc?????

    This article say about MMAPI and MIDP, I need a solution about JMF because, my application must capture audio on Pocket Pc with Jeode VM, and Jeode VM is compliant with JDK1.1.8(it's subset).

  • How can capture audio with labview

        I desired to make a audio equalizer vi using lab view. Audio will be taken from microphone. How can I capture sound from microphone with labview?

    See the example "Sound Card AutoPower Spectrum" This allows you to sample from an input device through your sound card, and take a spectrum.  you should be able to bin the spectrum by frequency bands, and show the histogram of frequencies.  You probably can even selectively resample and scale the frequencies, mix the signal and output the new sounds but I hav not tried this (I am not an audiophile so this is beyond my scope of expertise)  Good luck  ,
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • Capture audio static with Leopard?

    I just upgraded to Leopard and started capturing a new project with FCP. I now have static in the audio I didn't have before. Anyone else experiencing this. I've switch cables, drives, video playback decks and still get added static on all tapes. The audio on the tape when monitored with earphones is static free. Any ideas? Thanks.
    Gary

    Thanks for the reply. All cameras are set to 16 bit audio. Nothing has really changed except the Leopard OS upgrade. I am getting a warning box about the audio possibly not syncing, but there is no sync problem. I'm just curious if I'm the only one having this problem with audio static on capturing after the Leopard upgrade. Thanks for any help.
    Gary

  • Capture Audio with Ctl-*?

    Sometimes, in play mode I have been playing along on the keyboard, conclude and then realize that I did was not in record mode.
    A find that if I stop, issue the Ctl-* (numpad) that it will capture what is in the play buffer and slap it in to the sequence at hand.  Saved!
    Is there anything like this when I am playing the guitar or singing through a mic and want to capture audio?
    -- Gerry

    GerrySA wrote:
    Is there anything like this when I am playing the guitar or singing through a mic and want to capture audio?
    -- Gerry
    Yes...
    Well, almost
    If you keep "Punch On The Fly" enabled, Logic is actually ALWAYS recording, although once you hit stop, that buffer is cleared.
    So the trick to this is, if you are playing along (guitar or voice), and you realize you should have recorded that take, simply hit RECORD, BEFORE you stop. You can then "peel back" the audio region (drag the left side of that short region you'll have when stopping what you were playing to hit the record button), and drag it to the LEFT. You'll see all the audio you were playing there.

  • Capturing Audio with JMF

    Howdy, folks.
    Relative JMF newbie, here. I'm trying to write an app to capture audio from my sound card. Got the basics done, now I want to add some fancy stuff. Specifically, I'd like to show a display of the waveform.
    Now, when I create a datasink, I need to provide the processor (where the data comes from) and the medialocator (where the data goes to). The only way I know to build a medialocator is to give it a URL or a string for a file name. Is it possible to put the actual byte data directly into a buffered reader or something so I can translate it into a graphic waveform or do I have to write it to disk, and then read it back?
    Thanks for any help,
    Russ

    did you find any solution??
    please let me know thanks.
    [email protected]

  • Wtk 2.5 : Manager.createPlayer("capture://audio"); throws IO.Exception

    hi
    in wtk 2.5, i am creating the player with locator "capture://audio" for recording
    purpose ...
    But it gives java.IO.Exception in Manager.createPlayer(locator);
    fuction.
    Is there any way to come out of this problem?
    Waiting for reply..

    Hi
    Please try the code below
    Player player = Manager.createPlayer("capture://audio");
    player.realize ();
    player.start();
    Thread.currentThread().sleep(10000*2);
    player.close();
    try this

Maybe you are looking for

  • Cannot write or delete files from DVD+RW after erasing it through Disk Utility. Help.

    Hello. I erased (completely not quickly) my 4.7 GB DVD+RW with the help of Disk Utility in which it was successful, it asked me to open Finder, DVD Player or Disk Utility, I chose Finder. Then I dragged a MP4 and burned it, it asked me to name the bl

  • Variable call not working

    This script fetches users and their groups. I was trying to make a function or something where I call groups $USER_ID instead of printing it out each time. Here is how it is now: cat myFile | while read LINE do USER_ID=`echo $LINE | awk -F: '{print $

  • Logs or stats in iWeb site?

    Anyone know if there's a way to do easy referrer logs and stats for iWeb sites? I've found StatCounter, but that requires embedding an HTML code into every page, which is tough since you have to go in and re-edit it every time you modify something in

  • MacBook Pro i5 1600MHz RAM!

    Here guys, just wanted to show you that my MacBook has 16GB RAM @1600MHz on a late 2011 i5 and is working fine!

  • CIF Ques Stuck in READY State on R3 Inbound for no Reason

    Hi, Question pertains to CIF Processing and Ques waiting in READY State from R3 to SCM-APO for no Apparent Reason. Our Orders (PRs, STOs) generated via APO are being sent to R3 correctly, getting generated in R/3 but not coming back with the PR/STO N