How To Record Sound Using Applet

How To Record Sound Using JApplet

Hallo there,
I am intrested on the same topic but I am not so good to modify the sound sdk demo. Is there anyone willing to share some code?
Thanks
Matteo

Similar Messages

  • How to record sound using video setting of camera?

    using camera as a video recoder works fine but no sound. is sound recording with video possible? Ipad 2

    Hallo there,
    I am intrested on the same topic but I am not so good to modify the sound sdk demo. Is there anyone willing to share some code?
    Thanks
    Matteo

  • Can't record sound using the jack in/out on macbook pro 13 os x

    hi
    i bought a new macbook pro 13' intel core i5 4gb with the latest os x version 10.8.2. mainly for sound and video editing
    yesterday i tried to record sound using garage band and through the mini jack port. once i connected an mp3 player to the mini jack port, the sound prefrences window recognized it as headphones and not as input jack as it did on my friend's same mac with leopard os on it.
    it seems like no matter what i try to do (changing instument set up on garage band, restarting the computer with the jack in or out etc...) nothing worked
    i bought this mac just so i wouldn't have to deal with these kind of problems....suppose to be a very user friendly os and hardwear.
    very dissapointing. please if any one has a clue what can be done?

    i'm aware of my other audio interface options, but i would expact this machine to have the basic options every 20 year old pc has, a simple plug and play difault to get audio into my computer. i bought it at b and h in NY and in their specs it says that it's a 'combo kack' - meaning both in and out analog audio ports. after cheaking mac's site it says only headphones.
    also tryied to connect a digidesign mini mbox2, through the usb port, and i had to unplug it, shut down the mbp, restart it again etc.. and it also doesn't always work propely and makes all kinds of digital error sounds.
    although in this case i can't that the mbox is not damaged.
    over all it's very dissapointing. it's my first mac and i figured it would be a much more idiot proof, user freindly work tool.
    if you got any other tips i'd appreciate that
    thanx alot for the focusrite link

  • Can you record sound using a USB 6211 and convert the data to a .wav (or other sound) file?

    Hello,
    I am trying to build a system that will use a USB 6211 to record sounds from multiple electret microphones and then save the data as a .wav file or other sound file.  I have already built my mics and hooked the mics up to the USB 6211; the DAQ device seems to do an adequate job recording the signal - I've recorded from 3 mics at a time at 11,025 Hz, although I don't know how good the signals are since I can't save them for playback after the fact, and they aren't going through my sound card. Ultimately, I would like to save the data as a multichannel audio file which I could then open in a program such as Audacity for further editing and analysis. Since Audacity can import a variety of sound files, my file format doesn't need to be .wav if another format would work better.
    Any advice would be appreciated.
    Thanks, Eric

    If you are sampling all three simultaneously, your highest frequency recordable will be (11,025/2)/3, so about 1800Hz and that will pretty coarse (traditionally digital sound recording is at 44Ks/s at the low end). As to converting to a .wav, there are functions on the "Graphics and Sound" palette for saving waveforms to a .wav file.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • How to record sound with Java Sound?

    I just want to record a clip of sound and save it to a WAV file. I exhausted the web but didn't find a tutorial. Would someone be kind enough to give me a tutorial or a sample code? The simpler the better. Thanks.

    Here's the code I used to record and play sound. Hope the length do not confound you.
    import javax.sound.sampled.*;
    import java.io.*;
    // The audio format you want to record/play
    AudioFormat.Encoding encoding = AudioFormat.Encoding.PCM_SIGNED;
    int sampleRate = 44100;
    byte sampleSizeInBits = 16;
    int channels = 2;
    int frameSize = 4;
    int frameRate = 44100;
    boolean bigEndian = false;
    int bytesPerSecond = frameSize * frameRate;
    AudioFormat format = new AudioFormat(encoding, sampleRate, sampleSizeInBits, channels, frameSize, frameRate, bigEndian);
    //TO RECORD:
    //Get the line for recording
    try {
      targetLine = AudioSystem.getTargetDataLine(format);
    catch (LineUnavailableException e) {
      showMessage("Unable to get a recording line");
    // The formula might be a bit hard :)
    float timeQuantum = 0.1F;
    int bufferQuantum = frameSize * (int)(frameRate * timeQuantum);
    float maxTime = 10F;
    int maxQuantums = (int)(maxTime / timeQuantum);
    int bufferCapacity = bufferQuantum * maxQuantums;
    byte[] buffer = new byte[bufferCapacity]; // the array to hold the recorded sound
    int bufferLength = 0;
    //The following has to repeated every time you record a new piece of sound
    targetLine.open(format);
    targetLine.start();
    AudioInputStream in = new AudioInputStream(targetLine);
    bufferLength = 0;
    for (int i = 0; i < maxQuantums; i++) { //record up to bufferQuantum * maxQuantums bytes
      int len = in.read(buffer, bufferQuantum * i, bufferQuantum);
      if (len < bufferQuantum) break; // the recording may be interrupted
      bufferLength += len;
    targetLine.stop();
    targetLine.close();
    //Save the recorded sound into a file
    AudioInputStream stream = AudioSystem.getAudioInputStream(new ByteArrayInputStream(buffer, 0, bufferLength));
    AudioFileFormat.Type fileType = AudioFileFormat.Type.WAVE;
    File file = new File(...); // your file name
    AudioSystem.write(stream, fileType, file);
    //TO PLAY:
    //Get the line for playing
    try {
      sourceLine = AudioSystem.getSourceDataLine(format);
    catch (LineUnavailableException e) {
      showMessage("Unable to get a playback line");
    //The following has to repeated every time you play a new piece of sound
    sourceLine.open(format);
    sourceLine.start();
    int quantums = bufferLength / bufferQuantum;
    for (int i = 0; i < quantums; i++) {
      sourceLine.write(buffer, bufferQuantum * i, bufferQuantum);
    sourceLine.drain(); //Drain the line to make sure all the sound you feed it is played
    sourceLine.stop();
    sourceLine.close();
    //Or, if you want to play a file:
    File audioFile = new File(...);//
    AudioInputStream in = AudioSystem.getAudioInputStream(audioFile);
    sourceDataLine.open(format);
    sourceDataLine.start();
    while(true) {
      if(in.read(buffer,0,bufferQuantum) == -1) break; // read a bit of sound from the file
      sourceDataLine.write(buffer,0,buffer.length); // and play it
    sourceDataLine.drain();
    sourceDataLine.stop();
    sourceDataLine.close();You may also do this to record sound directly into a file:
    targetLine.open(format);
    targetLine.start();
    AudioInputStream in = new AudioInputStream(targetLine);
    AudioFileFormat.Type fileType = AudioFileFormat.Type.WAVE;
    File file = new File(...); // your file name
    new Thread() {public void run() {AudioSystem.write(stream, fileType, file);}}.start(); //Run this in a separate thread
    //When you want to stop recording, run the following: (usually triggered by a button or sth)
    targetLine.stop();
    targetLine.close();Edited by: Maigo on Jun 26, 2008 7:44 AM

  • How to record sound with JMF?

    I just want to record a clip of sound and save it in a WAV file. I exhausted the web but just couldn't find a tutorial. Would someone be kind enough to give me a tutorial or a sample code? The simpler the better. Thanks.

    Hi there,
    The following lines of code will record sound for 5 sec and save it in file C:/test.wav.
    import java.io.IOException;
    import javax.media.CannotRealizeException;
    import javax.media.DataSink;
    import javax.media.Format;
    import javax.media.Manager;
    import javax.media.MediaLocator;
    import javax.media.NoDataSinkException;
    import javax.media.NoProcessorException;
    import javax.media.NotRealizedError;
    import javax.media.Processor;
    import javax.media.ProcessorModel;
    import javax.media.format.AudioFormat;
    import javax.media.protocol.FileTypeDescriptor;
    public class WAVWriter {
         public void record(){
              AudioFormat format = new AudioFormat(AudioFormat.LINEAR, 44100, 16, 1);
              ProcessorModel model = new ProcessorModel(new Format[]{format}, new FileTypeDescriptor(FileTypeDescriptor.WAVE));
              try {
                   Processor processor = Manager.createRealizedProcessor(model);
                   DataSink sink = Manager.createDataSink(processor.getDataOutput(), new MediaLocator("file:///C:/test.wav"));
                   processor.start();
                   sink.open();
                   sink.start();
                   Thread.sleep(5000);
                   sink.stop();
                   sink.close();
                   processor.stop();
                   processor.close();
              } catch (NoProcessorException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (CannotRealizeException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (NoDataSinkException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (NotRealizedError e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (InterruptedException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         public static void main(String[] args) {
              new WAVWriter().record();
    }I hope this will help. Don't forget to go through JMF guide (http://www.cdt.luth.se/~johank/smd151/jmf/jmf2_0-guide.pdf), especially page 81... it's not always helpfull, but sometimes, it may give you some good answers.
    Happy coding!!!

  • How to record sound ?

    I would like to record sound from f ex YouTube. Is it possible ?

    To edit, Trim:
    Open the finished product in iTunes and then you can change it to a mp3, AAC, AIFF or WAV file.

  • How to detect sound using JMF

    Hi,
    I want to detect a beep sound that is played on the machine by another application. Basically, connect to the sound card and see if beep was played. This sound would effectively play on the machine speakers. if speakers are present.
    I want to eventually grab a couple of sounds but first start with beep. So, over a duration of 2 minutes, I would alternate between 'beep' and 'bang'. And whenever these sounds are played, I want to be able to detect them.
    I would appreciate if there is sample code that I can start with.
    I am new to java audio/media and most data that I found was recording sound from microphone.
    Thanks.

    I tried getting the device list on my system but the following code is not returning any devices (deviicelist is empty) ? When I look at my Device Manager on Windows7 machine, I see there is 'High Definition audio device' . Does anyone have a clue why/when would this happen ?
    I have jmf installed and it is in the classpath. I also have jmf.jar, sound.jar added to my project.
    CaptureDCaptureDeviceInfo di = null;
    Vector deviceList = CaptureDeviceManager.getDeviceList(
                        null);
              if (deviceList.isEmpty())
                   System.out.println("No Devices found");
              if ( deviceList.size() > 0 )
              di = (CaptureDeviceInfo)deviceList.firstElement();
              System.out.println("di::" + di.getName());

  • How to record sound into array using DAQ ?

    Hi to everyone
    Im last year student , im using LABVIEW for the first time.
    i have an myDAQ , i need to record audio go through the analog ports/AUDIO INPUT of the myDAQ, into array, for later singal proccesing.
    its for my final project.

    First, Learn to use LabVIEW with myDAQ is a series of videos.  To quote the Introduction,
    The Learn to LabVIEW with MyDAQ provides fundamental LabVIEW knowledge for a great out of the box experience with your MyDAQ. Each unit provides a set of videos to allow you to learn at your own pace and review material an unlimited number of times. As well, most videos are accompanied by minor exercises which will help drive home important topics and challenge you along the way.
    View the videos, do the exercises, and I suspect many of your questions will be answered.  If you write some LabVIEW code and have a problem, come back, show us your code, and explain the problem.
    Bob Schor

  • Can I record sound using a microphone and then upload it to server?

    Hello guys I thank you in advance for reading this. What I want to know is if it is possible to record a sound clip using a microphone and then upload it to the server using a swf applet in a webpage. Im an experienced java/javascript programmer but just starting out with flash/action script. What technologies will I need to do this? Can I do this simply using simply an swf file and an apache/php or jsp page? Again, thanks alot for your help.
    -BeWilled

    You can Microphone class in Flash to record the sound and it will directly upload to FMS server .
    Use the Microphone class to capture audio from a microphone attached to a computer . Use the Microphone class to monitor the audio locally. Use the NetConnection and NetStream classes to transmit the audio to Flash Media Server. Flash Media Server can send the audio to other servers and broadcast it to other clients running Swf files .
    Below link might help you in doing this : http://www.adobe.com/devnet/air/flex/articles/using_mic_api.html

  • How to test sound using echo call on my Samsung Pr...

    I have a Skype account and am trying to see if the audio works on my Samsung Galaxy Pro 8.4 tablet which is running Android 4.4.2.  How do I make an echo test call on this device?

    I found some refrance it,works.But another thing is every code i found is applied on button.But,I cant use this code b.coz I have n number of buttons,it will again create problem.Can u suggest me anything more?
    I want something like it will attch sound through folder path (link).And 1 button should abale to play more than 10 sounds with diffrent click.
    Thanks.

  • How to record audio using wireless phone headset on a mac (Adobe CS6)?

    I have purchased a Plantronics Savvi w440 headset, with which I want to record audio. I was assured by the company that I could.
    Well, Audition won't record me talking; it only "picks up" about 1 sec, then stops recording.
    I have used a variety of mics before; I know how to set them up in Audio Hardware. My Default input & output are this new headset. Still, no recording.
    I have Audition CS6 on a macbook pro.
    I need help. Thanks.

    Thanks Bob for your help. I had already downloaded and installed the software for this headset on my Mac. Still won't work. There are no updates for this headset. At least, I haven't found one.

  • Recording sounds using the built-in microphone.

    I would like to record some household sounds and save them to iTunes. How can I do this? I have been able to download some sounds from commercial sites, but need different ones.

    You preferences may be different.
    blue apple > system preferences > sound
    Click on red circle to start record.
    Click on square to stop recording.
    Click on back to start
    click on green triangle to play.
    Robert

  • How to record sound only

    please anybody help me for giving a useful forum or some text or some example source code

    Its simple dear,
    just find the Audio i/p device using CaptureDeviceManager and defining audio format you wish to record
    Vector<CaptureDeviceInfo> devices =new Vector<CaptureDeviceInfo>();
              devices=CaptureDeviceManager.getDeviceList(new AudioFormat("LINEAR",44100, 16, 2));
    then you got device
    make datasource using this device location (using getLocator())
    then set Datasource realize processor and tranmission is started then

  • How to attach sound using link to any button?

    Hi,
    am using this code to call sound file after click on button.
    PAdha1.onRelease = function () {
    mySoundC = new Sound(this);
              mySoundC.attachSound("PAdhaSound1");
             mySoundC.start(0, 99);  //10 represents the number of loops
             gotoAndPlay("play2");
                          _global.myTaalLaya = "High1";
    My problem is I have more than 100 buttons and their own sound files.Now ,this buttons are on separet scene so, it creates separet image for each button and separet sound for each button which is in liblary.Now,my problem is there are huge sound files and button images.So,flash is not supporting this.It does not show .swf file(Output result).
    I think this is beacause of a lot of images and sound files.
    Is there any other way to call sound file through link function.Now sounds files are called through "linkage".from liblary.
    am using flash cs 5 with as 2.

    I found some refrance it,works.But another thing is every code i found is applied on button.But,I cant use this code b.coz I have n number of buttons,it will again create problem.Can u suggest me anything more?
    I want something like it will attch sound through folder path (link).And 1 button should abale to play more than 10 sounds with diffrent click.
    Thanks.

Maybe you are looking for

  • Hp laserjet 600 M603

    error message program memory is full

  • Tokenize xml maybe using RegEx?

    I'm working on a simple search engine for dynamically loaded XML data. I have data of this form (more or less): <sessions> <session id=##>           <title><![CDATA[The Title]]></title>           <presenter>A person or two goes here with title</prese

  • Unable to rotate groups of selected images

    I have tried the various methods discussed in the help but only a single image rotates.  I am using Aperture 3.

  • Cannot unzip .zip even with Archive Utility

    Hi, I have problem unzipping a .zip file. When I use the Archive Utility to unzip it, it yields a file with the same name with .zip.cpgz on its end. When I subsequently make another trial - to unzip this new file, it yields the very same file only wi

  • Problem monitoring BPM

    Hi Friends I have made the File to File  scenario using  BPM , I can se the file is being picked up by the sender cc , but no further things happened When I try to monitor the BPM wih SXMB_MONI_BPE  it says no work item exists. I can se message in SX