detecting amplitude threshold on the RECORDCHAN

Started by Sam,

Sam

Hi,

Any ideas about this? I want to have the Microphone monitor the room constantly, and if somebody starts talking (same thing as the volume breaks a threshold), start recording for 5 seconds and save to file. I know I should be recording all the time, but what is the most reasonable way of checking if the threshold has been broken, to start saving the buffer for 5 seconds?

Sam


Creadig

Try detecting silence on the recorded buf.
when the silence is broken.. start record for 5 secs.

i hope this help.
 ;)

bigjim

Just have a loop that uses Bass_ChannelGetLevel and wait for the level to jump above a certain level. I have some code somewhere for a voice activated call recorder if you want it. ;D

Creadig

I have some code somewhere for a voice activated call recorder if you want it.

Interesting!.. code in vb6?.. can you send it to my e-mail?
 < creadig@hotmail.com >

Thanks BigJim.  ;D


Sam

Thanks guys,

So I took the average channel level of each mic (left and rught) during silence, and set the threshold to that. Its not really accurate, but it seems to do the trick. Sometimes there is no sound and it starts, and sometimes there is speech and it doesn't. But the majority of the time it works.

Thanks,