Compress Audio from Microphone

Hi, I am developing an app that records voice from mic and needs to save it in the disk then send it via email. I got it no problem. I get the bytes and tranform it to wav format using the WAVWriter class.
But the wav file is HUGE. As I said, I need to send it via Email. A 10 seconds wav file is almos 1MB =/. I researched and I found a class that transforms WAV to MP3: http://code.google.com/p/flash-kikko/
Thats worked, but the resulting file is relatively big. it encodes to 128kb mp3 and I cant change the bitrate. And 128 just to a voice sound is much much more than I need. The resulting file is a bit larger than I would like.
But the BIG BIG problem is that, it takes almost 15 seconds to encode a 10 second wav to MP3 in a galaxy S or a galaxy Tab device.
It takes TOO long to encode and the resulting file is really big compared to the voice recorder that is avaliable in android devices. It records the voice, it takes 0 seconds to encode to the final file. and the file is MUCH smaller than the one I am getting.
Is there a way to compress the microphone data I have, to get a smaller file, like the voice recorder in a efficient way android devices do?
'Is there a way for my Air app to use the android's voice recorder to record the sound for my application?
Thank you very much.

Hi Daniel,
I've gone through the Kikko route and found the encoding time unacceptable as well. The best I could do was reduce my sampling rate to 22k which is acceptable for voice (but not fantastic) and compress the bytearray before I stored it and decompress when I use the recording. The bytearray compression is almost trivial but hey I guess every little bit helps if you are storing a lot of files.
Another method you could use is uploading the wav files to a server and encoding and emailing them there. Upload time is the only issue with that.
I spent months researching this problem and unfortunately there isn't a great solution out there. =(
Please update this thread if you do end up finding something.
Edit: I forgot about  Native Extensions that just got released with Adobe Air 3. That should open up a lot more solutions as you could call an mp3 encoder n Objective-C which should have far superior speed. I'll probably be looking into this solution in a few weeks but let me know if you figure something out.

Similar Messages

  • Not compressing audio from MPEG

    I'm trying to use an MPEG in FCP, but it won't see the audio. I tried to throw it into Compressor, but Compressor says that it won't compress audio from an MPEG 1 or MPEG 2. Any advice?
    Thanks.

    I had only used it to rip from DVDs to this point . . . seems to be quite a bit more useful than I have seen it so far. Thanks!

  • Audio from Microphone Repeats - No External Speakers

    This one is a little odd.
    We are getting an echoing - but not from open mics /
    speakers. It's like the audio is being re-routed into other audio
    streams and we have no idea why. I'm working through the soundmax
    drivers now.
    I'm unable to get any consistent points to determine what is
    happening, but it is not speakers / open mics.
    Has anyone else had an echoing - more of a repeating - from
    microphones?
    TIA, I've found nothing from my web searches yet.
    -SR

    The sound / audio set up for the computers with this issue had the recording properties enabled within the audio settings - effectively re-broadcasting all of the other User's microphones within the session.

  • H7000 Bluetooth headset - No audio from microphone in Windows 8

    Recently I bought a new HP H7000 Bluetooth headset. After I successfully paired it with my laptop (HP EliteBook 8470p, running Windows 8 and the Broadcom Bluetooth driver downloaded from Broadcom's site), I can hear audio from the headphones, but the microphone part doesn't seem to be functioning, it doesn't pick up a signal no matter how loud I speak.
    When trying the same headset on the same laptop running Windows 7 SP1, the microphone is working perfectly.
    In Windows 8, the Headset Microphone is Enabled in the Sound settings' Recording devices, and is set as Default Device. The Internal Microphone Array device (the laptop's built-in mic) is picking up audio no problem, so that part of Windows 8 is functioning properly. So there seems to be no issue with any of the settings, I went them through several times.
    It's just the H7000 headset's mic under Windows 8, that is having the problem.
    Anyone met this scenario, or even have a fix?

    I managed to narrow it down to the Broadcom Bluetooth chipset driver in Windows 8.
    Finally I ended up disabling it, and buying a USB Bluetooth micro-dongle with an Atheros chipset. With this, the headset works fine.
    It is still ridiculous, to solve such a problem with additional investment, but this is not HP's fault it turned out.
    I'll try to contact Broadcom's customer service, and keep an eye open for any Win8 driver updates on their support website.

  • Capturing audio from microphone and save it to a file

    Hi!!
    I'm searching for a code using JavaSound that allows capturing audio from a microphone and save it to a file.
    thanks in advance and sorry for my English

    Hi,
    Check out these links.
    http://developer.java.sun.com/developer/technicalArticles/Media/JavaSoundAPI/
    http://java.sun.com/j2se/1.3/docs/guide/sound/prog_guide/chapter5.fm.html
    Also this is a very good site for finding similar issue as yours.
    http://www.jsresources.org/examples/audio.html
    Hope this helps.
    Regards,
    Roopasri Vittal
    Developer Technical Support
    Sun Microsystems
    http://sun.com/developers/support

  • Run audio from microphone to speakers?

    I have an external USB microphone for my MacBook, and I want to know how I can make the audio from the microphone play immediately through the speakers instead of being recorded. Any help would be greatly appreciated.

    Try LineIn.
    Cheers.

  • IOS 6.1.2 STILL does not fix massively distorted and compressed audio from videos

    I bought an iPad to show prospective clients my video and audio recording services.
    Ever since changing to iOS 6 the audio from all the videos that I have put on the iPad are completely
    distorted and overly comressed. The slightest bass note and everything is garbled beyond belief.
    The same videos on my iPhone 4 sound wonderful as they should, but the same videos on the iPad
    are completely wasted. Playing the sound through the built in speaker of the iPad proves good, but
    the headphone output is horrible. Audio from other sources is clean and undistorted.
    I spoke to Apple Care about six times, and two different Senior Advisors neither of which did anything for me.
    I had the local Apple store replace the iPad but that made no difference.
    I now have two iPads and they both have the same exact issue. 
    It's just pathetic that Apple has not addressed this. 
    Dan   

    Addressed an issue that only you seem to be having?
    Apple offers great service but not this personalized.
    I have never had this issue and I transfer or watch a lot of video to my iPad.

  • Jumpy audio from microphone in Audacity and Jitsi

    If I record from the microphone in Audacity without simultaneous playback of other tracks, the recording is fine. If I try to record while playing back a track, the recording is jumpy and clipped. The same thing happens when I try to use voice chat in Jitsi. The chat partner hears unintelligible, jumpy audio. By jumpy I mean that it sounds like the distance to the microphone is being quickly and randomly changed while the microphone is also being randomly turned on and off with high frequency.
    This occurs on two separate systems, both of which are using default ALSA without Jack or PulseAudio. I have not created an asoundrc file. CPU usage is very low in some cases (e.g. 2-5% on a single core). I also have ample RAM if that matters.
    I have searched for a solution but I suspect that I am not using the right terms. I cannot believe that my modern Arch systems would be unable to handle something that I could do on a budget system 10 years ago.
    Any help would be appreciated. Thanks!

    *bump*
    Jitsi 2 is out and I would really like to be able to use it. Surely I am not the only one to run into issue with simultaneous audio input and output.
    Do I really need something like Pulseaudio  or Jack? (I haven't tried yet because I just can't believe that this is impossible with Alsa... it should "just work").

  • Record audio from microphone in .swf

    Hello
    i need to record audio with help of microphone,
    can any 1 tell me how it is possible and what is
    the possible way to do this.
    I am having flash 8 and flash communication(media) server 2.0
    Please let me know which are the possible ways to this type
    of communication.
    regards
    Bipin N

    *bump*
    Jitsi 2 is out and I would really like to be able to use it. Surely I am not the only one to run into issue with simultaneous audio input and output.
    Do I really need something like Pulseaudio  or Jack? (I haven't tried yet because I just can't believe that this is impossible with Alsa... it should "just work").

  • Capture Audio from microphone

    I can't capture microphone on winxp, but ok on win 2003.
    Help me.
    Thanks!

    [http://wiki.java.net/bin/view/Javapedia/JavaSoundDataSourceSampleProgram]
    Just saw this and [http://wiki.java.net/bin/view/Javapedia/JMFQuickstartGuide]. This is great work, congratulations!
    I have a small suggestion, I saw [JavaMail Forum|http://forums.sun.com/forum.jspa?forumID=43] sometime back and it has a 'sticky' which points to FAQs. It was added by 'bshannon', a poster who handles a forum single handedly, just like you :) .... So, I was wondering if you also can manage to post the link to new compilation of yours in a 'sticky' thread, then it would be very nice. I don't know how 'bshannon' managed it, but I guess you can suggest this at 'News and Updates forum' (which also has stickys of its own).
    I had not visited this forum for a long time, I see your stars are at 'triple Nelson' ;-) I hope you get over it as quickly as possible :) although I am not superstitious...
    Thanks!
    Edit: Is Bill Shannon author (one of the authors) of JavaMail api? because here he mentions api homepage as his homepage, quite possible!
    Edited by: T.B.M on Sep 22, 2009 11:59 PM

  • Can JMF capture audio from sound card?

    I want to know if JMF can capture sound/audio from the sound card. Until now we have been capturing audio from microphone. but is there any possibility of capturing audio from sound card using JMF.
    The audio captured from the sound card is to be streamed using JMF/RTP API.

    Dear seniors,
    i have tried to display my audio file as a graph as
    x axis being the Time and the y axis beeing the frequency/pitch.
    look at this post, i have mentioned all here...
    http://forum.java.sun.com/thread.jspa?messageID=3073027&#3073027
    is it possible to display as i desired?
    wht the audio stream has? is it frequency or pitch?...
    pls do give me some tips on that...
    thanx in advance
    -Munas.

  • Process audio from mic and play it back. (What is wrong with my code?)

    Hi, I am trying to take the audio from the mic (at javasound://0), process it (add the JMF API sample plug in GainEffect.java) and then play the processed data source. The code I have so far is below.
    I am getting no errors - compiles fine - but nothing seems to be happening.
    The grand goal is to take the audio being captured from the mic and process it in real time using a plug in (not necessarily GainEffect) and also play it back (the processed audio) at the same time.
    Where am I going wrong? Thanks!
    import java.io.IOException;
    import java.util.Vector;
    import javax.media.*;
    import javax.media.control.TrackControl;
    import javax.media.format.AudioFormat;
    import javax.media.protocol.DataSource;
    public class audioProcess {
         public static void main(String[] args){
              CaptureDeviceInfo audioCapDevInfo = null;
              Vector audioCapDevList = null;
              Vector plugIn;
              Player p;
              Processor pro = null;
              TrackControl[] tracks;
              DataSource ds;
              Vector plug;
              TrackControl audioTrack = null;
              AudioFormat audFormat = new AudioFormat(
                   AudioFormat.LINEAR,
                   44100,
                   16,
                   2,
                   AudioFormat.LITTLE_ENDIAN,
                   AudioFormat.SIGNED,
                   16,
                   Format.NOT_SPECIFIED,
                   Format.byteArray);
              Format[] alinear=new AudioFormat[]{new AudioFormat(     AudioFormat.LINEAR,
                        44100,
                        16,
                        2,
                        AudioFormat.LITTLE_ENDIAN,
                        AudioFormat.SIGNED,
                        16,
                        Format.NOT_SPECIFIED,
                        Format.byteArray)};
            audioCapDevList = CaptureDeviceManager.getDeviceList(audFormat);        
            if ((audioCapDevList.size() > 0)) {
                 audioCapDevInfo = (CaptureDeviceInfo) audioCapDevList.elementAt(0);
                audioCapDevLoc = audioCapDevInfo.getLocator();
            MediaLocator dest = new MediaLocator("javasound://0");  //take sound captured directly from microphone
            try{             
                 PlugInManager.addPlugIn("GainEffect", alinear, alinear, 3);
                 plug = PlugInManager.getPlugInList(audFormat, audFormat, 3);
                 int vectorSize = plug.size();
                 if(plug.elementAt(vectorSize - 1).equals("GainEffect")){
                      plug.removeElementAt(vectorSize - 1);
                      plug.insertElementAt("GainEffect", 0);
                      PlugInManager.setPlugInList(plug, 3);
                      PlugInManager.commit();
                 pro = Manager.createProcessor(dest);
                 pro.configure(); //must configure before call getTrackControls
                 while(pro.getState() != Processor.Configured);
                 tracks = pro.getTrackControls();
                 for (int i = 0; i < tracks.length; i++){
                      if(tracks.getFormat() instanceof AudioFormat){
                   audioTrack = tracks[i];
                   break;
         //add plug in effect
         try{
              Codec codec[] = {new  GainEffect()};
              audioTrack.setCodecChain(codec);
         } catch (UnsupportedPlugInException e){
         pro.realize();
         while(pro.getState() != Processor.Realized);
         ds = pro.getDataOutput();
         p = Manager.createRealizedPlayer(ds);
         p.start();
    catch(NoPlayerException e){
         e.printStackTrace();
    } catch (IOException e) {
              e.printStackTrace();

    Ok, I narrowed my code down to this. There doesn't appear to be any infinite loops in the code now, but perhaps I'm wrong? The processor is realizing, and I am creating a player with the data source output from the processor, yet there still is nothing playing... which leads me to think that there is something wrong with my plug in implementation or my processor creation. Do you have any ideas or points in the right direction?
    import java.io.IOException;
    import java.util.Vector;
    import javax.media.*;
    import javax.media.control.TrackControl;
    import javax.media.format.AudioFormat;
    import javax.media.protocol.DataSource;
    public class audioCapture {
         public static void main(String[] args){
              MediaLocator audioCapDevLoc = null;
              CaptureDeviceInfo audioCapDevInfo = null;
              Vector audioCapDevList = null;
              Vector plugIn;
              Player p;
              Processor pro = null;
              TrackControl[] tracks;
              DataSource ds;
              Vector plug;
              TrackControl audioTrack = null;
              AudioFormat audFormat = new AudioFormat(
                   AudioFormat.LINEAR,
                   44100,
                   16,
                   2,
                   AudioFormat.LITTLE_ENDIAN,
                   AudioFormat.SIGNED,
                   16,
                   Format.NOT_SPECIFIED,
                   Format.byteArray);
              Format[] alinear=new AudioFormat[]{new AudioFormat(     AudioFormat.LINEAR,
                        44100,
                        16,
                        2,
                        AudioFormat.LITTLE_ENDIAN,
                        AudioFormat.SIGNED,
                        16,
                        Format.NOT_SPECIFIED,
                        Format.byteArray)};
            audioCapDevList = CaptureDeviceManager.getDeviceList(audFormat);        
            if ((audioCapDevList.size() > 0)) {
                 audioCapDevInfo = (CaptureDeviceInfo) audioCapDevList.elementAt(0);
                audioCapDevLoc = audioCapDevInfo.getLocator();
            try{
            MediaLocator dest = new MediaLocator("javasound://0"); //take signal from soundcard
                 PlugInManager.addPlugIn("GainEffect", alinear, alinear, 3); //register plug in
                 plug = PlugInManager.getPlugInList(audFormat, audFormat, 3);
                 int vectorSize = plug.size();
                 if(plug.elementAt(vectorSize - 1).equals("GainEffect")){ //take the last plug in
                      plug.removeElementAt(vectorSize - 1);
                      plug.insertElementAt("GainEffect", 0);
                      PlugInManager.setPlugInList(plug, 3);
                      PlugInManager.commit();
                 pro = Manager.createProcessor(dest);
                 pro.configure(); //must configure before call getTrackControls
                 while(pro.getState() != Processor.Configured);
                 tracks = pro.getTrackControls();
                 for (int i = 0; i < tracks.length; i++){
                      if(tracks.getFormat() instanceof AudioFormat){
                   audioTrack = tracks[i];
                   break;
    Codec codec[] = {new  GainEffect()}; //add plug in effect
         audioTrack.setCodecChain(codec);
         pro.realize();
         while(pro.getState() != Processor.Realized); //don't move on until realized
         ds = pro.getDataOutput();
         p = Manager.createRealizedPlayer(ds); //create a player using the data source from the processor
         p.start();
    catch (IOException e){
         e.printStackTrace();
    catch (CannotRealizeException e){
         e.printStackTrace();
    catch(NoPlayerException e){
         e.printStackTrace();
    catch(UnsupportedPlugInException e){
         e.printStackTrace();
    PS - sorry for the late reply.

  • Recording audio from device on server

    I have some really nice audio recording gear hooked up to my computer, and I got a neat idea. I want to turn my PC into a web server and serve a flash application from it that allows a user to record audio from MY hardware (basically record the output of a mic hooked up to the "server") and then download the resulting audio file to his or her computer. Is this possible to do using a single flash application? I'm sure I could send commands to a C application on the "server" that would do the recording, but I'm wondering if there is a more simple solution. Also, monitoring the audio while it is being recorded would be nice.
    Thanks

    The issue I see with iTalk and similar iPod apps is that the iPod has no line-level input, so you'd have to use one of the earbud/microphone combinations or an external microphone like this one which will be limited as to quality. There are some other options here. But if you want pro quality, and particularly want to tap straight off of a mixing console, a device like the Alesis is going to be necessary, though there may be something less expensive that I can't find.
    If a microphone works for you, then iTalk might be fine. There's a freeware version of iTalk, iTalk Lite, you can try, to see if it will do the job. It doesn't have the advanced playback controls and has a limit of 2MB per recording, but it should allow you to test it out. Voxie is another possibility.
    Regards.

  • How to rip lossless high res audio from VIDEO_TS folder (DVD)?

    Freeware would be nice but I'll pay if I have to.
    I want to rip the audio from a DVD Video disc (not a DVD Audio disc - already got that covered).
    Let me be clear here so as to avoid all the lossy suggestions.
    I need to rip the full resolution audio to wav. If the DVD contains 24bit 96k audio, that's what I need in wav files with NO LOSS OF ANY KIND. 16/44.1 would not be OK. Don't even think of mentioning mp3.
    I've seen "DVD Audio Extractor" mentioned but can't find an OSX version.
    Thanks

    I'm giving you the benefit of the doubt here in that I used to play in a band where occasionally the sound person would record the tracks and give us a CD afterward. Although we owned the music we still had to rip it from a CD to get it into another format.
    Klaus1 is correct if what you want to do is with a DRM protected DVD. I will go out on a limb since strictly according to the Terms of Use the "no discussing" clause applies only to discussions on working around DRM protection (but frankly often any mention of any kind of DVD gets the hosts agitated and may well get this whole topic removed; still, if they don't want any talk of DVDs period then they should say so in the TOU). MPEGstreamclip might be able to do what you need. Again, that will only work with non DRM protected DVD (your family home videos).
    By the way, just about any DVD audio is already in a compressed format, be it AC3 or other audio codec, so there is already loss in quality from a raw format such as AIFF or WAV. In analogy, even the highest bitrate MP3 or AAC file is not going to be identical to the original CD.
    Message was edited by: Limnos

  • Audio from Final Cut Pro very very low

    Hi guys I have not have a problem for awhile. A friend of mine recently move from DPS Velocity system to Final Cut Pro Studio 2 using a Intel Pro 3.2GHZ with all the bell and whistle, so I am giving him some training and tutorial. They have some footage in Velocity which I use MPEG StreamClip to convert to a DV file, I brought it in FCP (Three File one video and two audio makes one clip) it play in FCP Played ok when I export it to DVD studio Pro the audio is extremely low (barely audio able)I open the clip in QuickTime and it did not play. There is other clip in the project, some capture in FCP and others imports in FCP Studio, DVD Studio Pro and QuickTime plays these audio ok. The audio from Velocity are Wave files, I taught anyfile that plays in FCP would play in QuickTime. Does anyone knows how to solve this problem please to help I would like my friend to change both system to Apple and FCP thanks.

    Wellcome to the forums!
    when I export it to DVD studio Pro the audio is extremely low (barely audio able)I open the clip in QuickTime and it did not play.
    I guess you encoded it to Dolby AC3 with Compressor, did you? Then you must chamge the standard Dolby preset as follows to keep the original FCP mix and level:
    - Dialog normalization: -31
    - Compression preset: none
    And QT cannot play AC3 files.
    Hope that helps !
      Alberto

Maybe you are looking for

  • Xml feature in 10g

    Hi, I have idea that there were some issues in 9i with xmltype and materialized views which are now cleared in 10g.i want to know in brief what were the issues and how they got solved.its imp for me.can anyone help me more on this? Thanks for the hel

  • Delivery Split at 2 levels

    Hi Experts, My requirement is to split SO items into mutiple deliveries. An example as below. Sales Order Item     Material     Qty    Unit 1         A               1       PC 2         B               1       PC 3         C               3       PC

  • Old InDesign 2.0 file - possible to convert?

    Hello, I am trying to open an old student project from about '03 or '04. It is a lovely project which I like to use as an example, but the print copy I have has been damaged and I would like to print a new one. I have the original file on a disk, but

  • BPM Time out Errors

    Dear All, The some of the BPM Scenarios are ending in timeout error. I think, i have to increase the time out parameters. I welcome your suggestions. If I increase the time out parameters, what could be the impact of that and what is the SAP Recomand

  • Adobe Lightroom will not start or open

    Install lightroom.  Everytime I try to open lightroom I get the following error: Lightroom cannot create a catalog named "Ligthroom 3 Catalog" on a network volume" Anybody have any ideas? Thank you in advance.