logo       

Re: measuring the level of sound: msg#00281

video.ffmpeg.user

Subject: Re: measuring the level of sound

Hi,

Mykhaylo Sorochan wrote:

>Hello,
>
>I have the following problem.
>
>I need to develop the software to measure the level of audio signal to make a
>decision when the sound level falls below some threshold (e.g. signal from
>mice disappear or people stop talking in room and leave it).
>
>Can anybody point me on how to do this? Any help (link, theory, code, etc.)
>would be appreciated.
>
>Thanks in advance.
>
>----
>Mykhaylo
>
>
This can be done in a few ways, ranging from bad to good:

1: half-wave, just take the max value of the signed input signal
2: full-wave, absolute value of of the signed input signal
3: squarer, square the signed input signal
These can be lowpass filtered to get a somewhat stable envelope.

and my favorite
4:instantaneous envelope, take the hilbert transform of the input
signal, square it and add it to the squared input signal

A hilbert transform can be approximated by a FIR filter with the zero
phase-phase impulse response
a(n) = 1-cos(pi n)/(pi n)=> a[n]={2/(pi n) for n odd, 0 for n even} multiply
this with a suitable window, (Hamming, Hann or Blackman) use atleast 60 coefs.

MvH
Benjamin Larsson

--
"incorrect information" is an oxymoron. Information is, by definition, factual,
correct.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise