dcsimg
Results 1 to 4 of 4

Thread: Recording audio

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2012
    Posts
    10

    Recording audio

    A little guidance goes a long way.

    I intend using the mic jack on a laptop running win7 & vb2010

    I have the following application requirements. I need to detect if there is sound coming from a mic, and if so, record to a wav file for 20 seconds, then close and save the wave file, wait for new sound and do it again. The mic will be switched on and off so that background noise doesn't mistakenly trigger a bogus recording.

    I really am not sure of the best place to start researching this....any guidance is greatly appreciated.

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    22,461

    Re: Recording audio

    i don't know how to detect sound input, but you can use mciSendString API to record:

    http://www.vbforums.com/showthread.p...Sound-Recorder

  3. #3
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,242

    Re: Recording audio

    The mic will be switched on and off so that background noise doesn't mistakenly trigger a bogus recording.
    This makes no sense at all. If the mic is off then it can't detect a sound of any kind. If it's switched on it can't make any distinction between an 'acceptable' sound and any other. The best you can do is set a volume threshold but that's not going to be perfect either. This simply isn't the way that audio recording is done. You switch the mic on, you record, you switch it off. Then you edit out anything extraneous. As an ex radio interviewer who did his own editing, I can assure you that sound activated recording is almost always unusable!
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  4. #4

    Thread Starter
    New Member
    Join Date
    Jul 2012
    Posts
    10

    Re: Recording audio

    Thanks for your advice, the idea of the switching of the mic is exactly as you point out, either no noise or noise. The volume threshold is exactly the thing I am asking for, any code ??

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width