Problem in capturing audio

Hello,
i want to capture audio from microphone and save it as a file.
i m new in jmf.i download jmf2.1.1 and in demo example5_5.java , it was complied succesfully but when i run this program that time devicelist not found & exit my program.
this is the code...
Vector deviceList = CaptureDeviceManager.getDeviceList(new
AudioFormat(AudioFormat.LINEAR, 44100, 16, 2));
if (deviceList.size() > 0)
di = (CaptureDeviceInfo)deviceList.firstElement();
else
System.exit(-1);
i m using jdk1.3 and window millanium.
plz help me how can i solve this problem .. And Any one who have a right code for recording audio from mic and save as a file plz send me..
my E-mail : [email protected]
Thanks for Advance
Sandeep

hi reggiee,
hey i really appreaciate the way u r responding man, thanks a lot.
Using JMF2.1.1 actually am able to capture audio with the file type is .WAV, but now the problem starts .
1) The capturing procedure works for only 4 seconds and exits(that i guess can b set by changing the time period, am i correct).
2) The captured audio when i open it plays so fastly as if its been forwarded that u cant understand wht exactly is captured.
3) Another problem is the captured file is to heavy, for a around 28 sec capture it comes around 1.2Mb(file size).That i guess is too much.Do tell me some remedy for this .
The code is in Exxample5_5.java file.
Now wht am looking for is ,
1) How can i able to start and stop the audio capturing in the run time.
2) At present it is capturing as .WAV type, can i capture by some other type say ".mid", ".au" ,".rmf" ? If so plz let me know.
Please do send me the change code also.If u have any.
Please do suggest me some remedy forthe said problems.
Am looking for replies of all u guys.Its been very urgent.
thanks in advance
regards
sandy

Similar Messages

  • 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.

  • Problem in capturing audio signal

    Hello Everyone,
    I am new to LabVIEW. I am trying to capture the sound signal, whenever a known frequency and amplitude is generated. I am recording the signal continously, but am unable to record the signal having only that particular frequency and amplitude.
    Please help me.
    Akshay

    There are some good Frequency Content functions in LabVIEW.  Look in the Waveform Measurement palette.  From there, you can get your frequency components and their amplitude.  When you see what you want, save the data.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Capture Audio which can be heard from speakers..

    Hi..
    I am currently facing a problem in capturing audio which can be heard from the speakers.. i.e. i want to capture audio generated by other applications. Till now I have been successful in capturing audio from microphone using JMF and Java Sound too.. But I fail to understand what capture device should I use to capture internal sound i.e. sound generated by other applications.. pls. help me out regarding this.. Can DirectSoundCapture (capture device) be used to capture such sounds or can it just capture sounds from microphone..? Pls. help me soon.. Thanks in advance :)

    hardware issue read more here
    https://discussions.apple.com/thread/1343532?start=315&tstart=0
    more hits
    https://www.google.dk/search?client=opera&q=iphone+stuck+in+headphone+mode&sourc eid=opera&ie=utf-8&oe=utf-8&channel=suggest

  • Problems capturing audio under linux

    Hello. I have developed an application that captures audio using the Audio API of JFM. The problem is when I start capturing audio under Linux (all the audio devices are well configurated), the JVM returns the following error:
    java.lang.IllegalArgumentException : Illegal request to write non integral numbre of
    frames (13107 bytes)
    The piece of code that causes the error is :
    while(!stop) {
    numBytesRead = inputLine.read(data,0, data.length); bufferoutput.write(data,0,
    numBytesRead); }
    where inputLine is a TargetDataLine.
    Under Windows this runs OK. Anyone know why not under Linux?
    Thanks

    Hi!
    I'm developing a videoconferencing application on Linux and I can't
    capture audio; I get messages like these: "couldn't initialize audio device"
    or " or "java.io.IOException: Cannot open audio device for input." from JMStudio.
    Have you got any idea about the problem ?
    Thankyou.

  • Problem capturing audio

    Hello!!
    I am trying to capture audio using jmf 2.1.1.e in Linux (SuSE 8.1) with jdk 1.4.2_04. I have "alsa" properly installed. However, when I try to capture using jmstudio, I am shown "javaSound audio", LINEAR, 44100 Hz, 16 bits, stereo, little endian and after cliking OK I get :"Could't initialize the Capture Device".
    I also try to run a code to capture audio, using the following:
    Vector audioDevices = CaptureDeviceManager.getDeviceList(new AudioFormat(AudioFormat.LINEAR, 44100, 16, 2));
    CaptureDeviceInfo audioCDI = (CaptureDeviceInfo)audioDevices.elementAt(0); //I get javaSound
    ds = Manager.createDataSource(audioCDI.getLocator());
    processor = javax.media.Manager.createProcessor(ds);
    But I get the following exception:
    LINEAR, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed
    LINEAR, 44100.0 Hz, 16-bit, Mono, LittleEndian, Signed
    LINEAR, 22050.0 Hz, 16-bit, Stereo, LittleEndian, Signed
    LINEAR, 22050.0 Hz, 16-bit, Mono, LittleEndian, Signed
    LINEAR, 11025.0 Hz, 16-bit, Stereo, LittleEndian, Signed
    LINEAR, 11025.0 Hz, 16-bit, Mono, LittleEndian, Signed
    LINEAR, 8000.0 Hz, 16-bit, Stereo, LittleEndian, Signed
    LINEAR, 8000.0 Hz, 16-bit, Mono, LittleEndian, Signed
    Audio not supported: interface TargetDataLine supporting format PCM_SIGNED, 44100.0 Hz, 16 bit, stereo, little-endian, audio data, and buffers of 22050 to 22050 bytes
    Audio not supported: interface TargetDataLine supporting format PCM_SIGNED, 44100.0 Hz, 16 bit, stereo, little-endian, audio data, and buffers of 22050 to 22050 bytes
    java.io.IOException: Cannot open audio device for input.
    javax.media.NoDataSourceException: Error instantiating class: com.sun.media.protocol.javasound.DataSource : java.io.IOException: Cannot open audio device for input.
    at javax.media.Manager.createDataSource(Manager.java:1012)
    at AVTransmit2.createProcessor(AVTransmit2.java:136)
    at AVTransmit2.start(AVTransmit2.java:54)
    at AVTransmit2.main(AVTransmit2.java:553)
    Exception in thread "main" java.lang.NullPointerException
    at AVTransmit2.waitForState(AVTransmit2.java:460)
    at AVTransmit2.createProcessor(AVTransmit2.java:188)
    at AVTransmit2.start(AVTransmit2.java:54)
    at AVTransmit2.main(AVTransmit2.java:553)
    Has anybody ever had this problem?? Do you know where the problem is? Do you know how to solve it??
    Could you be so kind as to help me, please???
    Thank you very much in advance.

    Hi wew64.
    I m new to JMF. I just made a simple media player not any more. can you please tell me what is "alsa" and "arts".
    actually I want to control my Sound card properties like "Microphone, Line In, etc...." is it possible in java if it is please tell me.
    I will be very thankful to you
    I m very upset about it because it is minimum 3-weeks late, my project is pending on this stage. All i want to do, just to mute the volume of "line in" (property in my sound card, which takes audio data from a TvTunner card and leaves this audio data out to the speakers.)so that only the audio from my computer's( any application like media player) can goes to the speakers, not the audio comming from the TvTunner(My TvTunner is opperated by the application provided by the vendor, I did not develop this on my own in java. I just made my media player in java). Yes this is the PROBLEM that both audios from TvTunner card and from My Application are being transmitted to speakers simultanously. But i want, when my application is running, the audio comming from TvTunner should be muted and when my application is exited, the TvTunner's audio should be unmuted. And this is only done by Line In property because Audio from TvTunner card is got by the Sound card through the Line In property.
    I tried my best to find out the solution but could not get any thing right.
    Please Help me
    thanks
    Khurram

  • Unable to capture audio from BlackMagic HD Extreme via Voice Over tool

    Hi !
    I'm trying to capture audio via my BlackMagic HD Extrem card using the Voice Over tool in FCP6, but I can't, no audio is incoming.
    I can ingest audio with video using log and capture, then I know my card and my cables are working.
    I tried to set the BM card as audio input in my Audio's System Prefereces Pane, but it isn't working either.
    I've been looking on the BM website, but I found nothing.
    Can you help me ?
    Thx

    Thanks for the reply.
    Looking at system preferences I found that audio input was set microphone. Don't know how it happened. I switched it to DeckLink and now FCP displays 16 input channels in Log and Capture dialog. I didn't try to capture yet but I think it solved the problem, because before I had only two channels displyed.

  • Emulator on OSX don't support capturing audio, is this a BUG?? SDK 3.0

    Hello all,
    well i'm trying to capture audio with the emulator on OSX. When i test the System Properties for capturing audio i always get FALSE.
    I tried the same application on Windows XP with the SDK 3.0 and it works, i'm getting True and can capture the audio with my microphone.
    Now i want to know if this is only a Bug and could be fixed or is the support for capturing audio on Mac OSX not implemented yet?
    Thanks
    Greetings

    What kind of problem about the display image in signature?
    How do you add the image into the message body when you send the message?
    Does it show correct through Web-based access?
    Outlook 2007 doesn't support some of Style Element, you may reference the link as below:
    http://www.campaignmonitor.com/css/
    Thanks.
    Tony Chen
    TechNet Community Support
    Thanks for your reply,  I know that some Style Elements won't be supported in Outlook, but this is not the reason.
    Please refer to my post previously, I post it but get no response.
    http://social.technet.microsoft.com/Forums/office/en-US/481170b1-f23f-4d46-9914-823326491846/is-this-a-bug-of-outlook-2007-about-images-displaying-in-signature?forum=outlook

  • Problem with USB audio device

    Hi all
    I have many problem with a USB device sound, i have a plantronic headset with a usb adapter to connect on my macbook pro, I have already this problem in the past but i have found a astuce to fix this problem. Before, when i'm on teamspeak 2, 3 or other software to capture audio with my headset, after 10 minutes, the sound make noise and i have a robotic voice... Since mac OS 10.5.7 apple have change the USB audio driver. i have found on internet the previous driver and change it on mac os X but since the new mac os 10.6.5 the problem com back with the previous or the new driver audio. I don't know if other people have this problem but this is very annoying.
    I have test my device on windows with boot camp many hour and nothing, no problem of distord sound or robotic voice.
    PS : I'm french and my english can be bad, sorry for that.

    Apparently, your previous search for audio issues in these forums missed this one: http://discussions.apple.com/message.jspa?messageID=12574650

  • Capturing Audio from DAT

    Hello,
    I'm trying to capture audio from a DAT deck (Tascam DA-20) into FCP HD by routing it through my JVC BR-DV600U DV deck (RCA output from DAT, RCA input to DV deck, Firewire into FCP).
    The DV deck's input is set to line-in, and the audio is being routed through (audio meters on DV deck mimic those on DAT deck, and I can hear the audio through the headphones jacked into my DV deck).
    However, when I try to capture the audio on FCP, I am unsuccessful, prompting the following window from FCP: "Error: Final Cut Pro HD was unable to read the movie file just captured."
    Now, I use the same set up I described above to capture footage from my Beta deck into FCP with no problems (route Beta signal through DV deck and firewire it into FCP). This leads me to believe that perhaps the glitch lies within my Capture Presets.
    At first, I tried to capture the signal as an Audio-Only DV NTSC 48 Khz/Non-controllable device. After that failed, I tried to create my own capture preset, but am not sure it will make a difference, as the only input choices I am given are DV Audio, Built-In Audio, and None.
    Any suggestions?
    Thanks.

    Why not capture the audio content outside of FCP, check the sample rate for 48Khz/16-bit, convert if necessary, save as an AIFF file, and then import that resulting sound file into FCP?
    Any good audio app, including STP will do captures.
    You are probably going to need to do some cleanup on the audio anyway before you use it, so why not just use an audio app to do it beforehand?
    Besides, if you have an audio device (PCI card or Firewire device) in your Mac, you can use the S/PDIF port for your connection to the DAT and do a digital transfer when you import.
    As I understand the way you are doing it now, you are taking digital content from the DAT, converting it to analog for the connection into your deck, and then re-converting it into digital when you capture it back into FCP.
    One big advantage of digital audio (and video) is to avoid generation loss and added noise during transfer if you go D-to-D.
    If you don't have an audio card or Firewire A/D audio I/O device with S/PDIF ports in your Mac, then see if you can find a friend who has one and can do the transfer for you. Then he can give you the file on a CD-ROM.
    That's what I'd do.

  • I cannot capture Audio

    MacBook Pro 2.33 GHz
    Final Cut Pro 5.1.4
    Quicktime Pro 7.1.5
    JVC Camcorder GR-DV4000E
    Connected via firewire direct to the MacBook
    I have reinstalled Quicktime and trashed the FCP preferences.
    When I go to Audio/Video settings>Capture Presets and edit my DV PAL 48 kHz settings under Quicktime Video Settings I get [Missing] DV Video and under Quicktime Audio Settings [Missing] DV Audio.
    In the digitizer menu under Quicktime Video Settings there is an item DV Video. If I select DV Video it does show next to input my camcorder (GR-DV4000). But when I select DV Video, there is not anymore a setting DV Audio in the menu under Quicktime Audio Settings (not even the [Missing] DV Audio setting).
    This behavior does not change if I select View>Reset AV Devices.
    I can capture video, but though there seems to be an audio file, it is silent. If I select Show Audio Waveforms in the timeline, there is no waveform visible. The viewer does have a stereo tab but it shows no (visible) audio waveforms.
    In System Settings, Capture Audio and Video to Separate Files is disabled. Enabling this does not make any difference.
    Is this a known bug? Anything I do wrong? Anything I could try?
    MacBook Pro Mac OS X (10.4.9) 2 GB Memory
    MacBook Pro Mac OS X (10.4.9) 2 GB Memory
    MacBook Pro Mac OS X (10.4.9) 2 GB Memory
    MacBook Pro Mac OS X (10.4.9) 2 GB Memory
    MacBook Pro Mac OS X (10.4.9) 2 GB Memory
    MacBook Pro Mac OS X (10.4.9) 2 GB Memory
    MacBook Pro Mac OS X (10.4.9) 2 GB Memory
    MacBook Pro   Mac OS X (10.4.9)   2 GB Memory

    Were the capture settings and any other settings the
    same for your test with the powerbook?
    Have you successfully captured on your macbook pro
    prior to your current problems?
    If so, have you made any changes to your system,
    software updates, system updates, Third party apps or
    plugins?
    In your original post you mention that though
    there seems to be an audio file, it is silent
    what exactly does this mean? Do you get a green
    audio track after capturing, but it is silent? Is
    there any movement in the levels meter (next to the
    toolbar)? Is there definitely audio on the tape(s)
    in question (do you hear it playing it on the cam?)
    Do any other tapes work?
    When I originally asked what the capture settings
    are, I was wondering if you have set FCP to capture
    audio from Ch1 when it was recorded to Ch2 on the
    camera i.e are you capturing audio 'Ch1 + Ch2', Ch1
    (L), CH2 (R), 'Stereo', 'Mono mix'?
    The Capture settings were exactly the same.
    This is the first time I try to capture on the MacBook Pro.
    I used the migration assistant to transfer my software on the Powerbook to the MacBook Pro.
    I get 4 green audio tracks that are silent. There is no movement in the audio meters, nor on the timeline, nor in the capture window.
    There is audio on the tapes. I have captured 11 different tapes that are all silent. Everything works on the Powerbook. The sound on the tapes is 16 bit stereo. Capture was set to record Left and Right linked as a stereo file.
    I think this happens because I cannot select DV Audio in the Audio/Video Settings.
    The strange thing is that I get [Missing] DV Video and [Missing] DV Audio in the Audio/Video Settings. In the menu under Video Settings I can select DV Video, but when I select this, there is no more DV Audio in the menu under Audio Settings.
    The tapes were captured with [Missing] DV Video and [Missing] DV Audio. This captures the video but not the audio.
    MacBook Pro Mac OS X (10.4.9) 2 GB Memory

  • Capture audio and video files to seperate files

    Forum,
    Having suffered problems with OS 10.5 and Quicktime 7.4.1 I have done a clean install with 10. 4 .11.
    When I select capture the following notice appears
    "Audio only capture selected,video preview disabled"
    In system settings "capture audio and video to seperate files " is NOT checked.
    But that may not mean the same as the statement in in the capture window.
    I have searched HELP and a book called" Optimizing your Final Cut Pro System" but can not find an answer.
    Advice would be appreciated.
    Thank you
    Michael Craven

    Hi,
    Check this:
    in Log & Capture window select Clip Settings tab and make sure video box is checked.
    Cheers,
    G.

  • 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

  • Capture audio

    Hello,
    i want to capture audio from microphone and save it as a file.
    i m new in jmf.i download jmf2.1.1 and in demo example5_5.java , it was complied succesfully but when i run this program that time devicelist not found & exit my program.
    this is the code...
    Vector deviceList = CaptureDeviceManager.getDeviceList(new
    AudioFormat(AudioFormat.LINEAR, 44100, 16, 2));
    if (deviceList.size() > 0)
    di = (CaptureDeviceInfo)deviceList.firstElement();
    else
    System.exit(-1);
    i m using jdk1.3 and window millanium.
    plz help me how can i solve this problem .. And Any one who have a right code for recording audio from mic and save as a file plz send me..
    my E-mail : [email protected]
    Thanks for Advance
    Sandeep

    Log and Capture window --> Clip Settings tab
    right hand side, lower "Audio" pane ... there should be a checkbox called "Preview" , make sure it is checked.
    Or monitor it from your capture device...deck, camera, whathaveyou.
    Shane
    "There's no need to fear, UNDERDOG is here!"

  • Capture Audio from Mic

    I am new to Java and need to know where to start with developing a Java app that can capture audio from a pc's mic, convert it to mp3, name the audio, and store it in a directory of my choosing. Additionally, I'll need an interface to that audio app that can receive function calls and args from a windows-based application.
    Can you point me in the right direction- sample code if possible.
    Thanks,
    Jeff

    I have the same problem. There doesn't seem to be any sample code for capturing an audio recording with JMF! I have browsed the web, the usenet groups and the (physical) library. It's almost like they try to keep it secret :/
    There is plenty of information on how to use the JMF player, though.

Maybe you are looking for