Detect sound at microphone

Please discuss general Delphi programming topics here.

Detect sound at microphone

Postby sinugovind » March 12th, 2008, 8:38 am

Hi. I have a microphone attached to my PC. I can use OnLevel property of Audio Recorder components like discussed earlier. But I have an issue. In the Volume control of my PC, in the Options - Properties - <I choose my audio input>. I set microphone as my audio recording device and set its volume to the lowest... When I use the SoundRecorder functionality available on my PC, now it does not detect sound unless I make a loud sound. But when I use the onLevel property of WaveAudio, the value of level is still > 0 when I make a small sound. So even after adjusting the microphone sensitivity the level varaible has got a non zero value when a small sound is produced. Thus the functions which should work only when a loud sound is produced gets done even after I make a small sound. Could someone please help me out
sinugovind
Active Member
Active Member
 
Posts: 6
Joined: March 12th, 2008, 8:22 am

Postby Kambiz » March 12th, 2008, 10:41 am

The Level varies from 0 to 100. I think comparing the level against a higher value (e.g. 20) solves the problem.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby cozturk » March 12th, 2008, 2:08 pm

Another good methot is using RMS level ( on data event)
I think RMS value comparing better than peak comparing.
http://en.wikipedia.org/wiki/Root_mean_square
cozturk
Moderator
Moderator
 
Posts: 63
Joined: June 30th, 2005, 5:39 am
Location: Istanbul - Turkiye

Postby sinugovind » March 31st, 2008, 9:07 am

Thanks a lot for your help... Changing the audio level worked
sinugovind
Active Member
Active Member
 
Posts: 6
Joined: March 12th, 2008, 8:22 am


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 13 guests

cron