Link to home
Start Free TrialLog in
Avatar of jackton
jackton

asked on

How can I know if the people start to speak and stop speaking?

My prgoram need to record people's speech via microphone.
(only in one or two minutes)

And if he haven't speak,there is only backgroup noise.
at this time I didn't want to record the sound file,
I want is When he start to say,then I start record the file.
so how can i know if he starts to speak ,
and how can i kown if he stops?

another question: how can i filter the background noise?
Avatar of nietod
nietod

Just analize the signal in small slices and look for an intensity that is greater than some sort of threshhold value, if it is above the value start recording (starting with that segment, not the next one).

>> another question: how can i filter the background noise?
This sort of question is the focus of many PhD thesis, scientific papers and patents.  But one basic approach is to record a short segment of the background noise and perform a fourier transform on it to get its spectral components.  Then to filter out the noise from a recording, perform a transform on the recording (short segments of it) to get the spectral components, subtract off the components of the noise.   Then perform another transform to get the "cleaned" signal.

If that is unfamilair to you, your probably should take a trip to a library and do some research on waves, aucostic signals, fourier transforms and signal processing.  
Avatar of jkr
Just an additional comment: As a (discrete) Fourier transformation consumes lots of CPU time, you should concentrate on the frequency components of interest, e.g. up to 20 kHz.
And the 'treshold' can easily be evaluated by calculating the square of the area between the signal graph and the time axis (which corresponds directly to the signal energy and is the same in both Fourier and time domain).
Another pointer: When you're already heading to the library, be sure to also look for books on Z transformation ;-)
ASKER CERTIFIED SOLUTION
Avatar of Lischke
Lischke

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jackton

ASKER

Thanks all.
What is THIS??????
Well, i think any accepted solution should be visible here, in order to not waste the points of people that reqest a PAQ!!!
Sorry for that. See https://www.experts-exchange.com/topics/comp/lang/delphi/Q.10105812 for the solution.

Ciao, Mike
Well, IMHO, this doesn't help - see, i am not interested in this particular solution (having done enough signal processing by myself), but: If sombody is interested in a solution, requsts this PAQ, spends his/her points on it and is just redirected to a Delphi PAQ (on which points also have to be spent), he/she must consider this a hoax...
Hey jkr,

you're right and it'll not happen again. Let's close down this fruitless discussion.

Ciao, Mike