Author Topic: detecting amplitude threshold on the RECORDCHAN  (Read 8714 times)

Sam

  • Guest
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

sam

  • Guest
Re: detecting amplitude  threshold on the RECORDCH
« Reply #1 on: 26 Aug '03 - 17:49 »
No suggestions anyone?...

Creadig

  • Posts: 71
Re: detecting amplitude  threshold on the RECORDCH
« Reply #2 on: 26 Aug '03 - 19:24 »
Try detecting silence on the recorded buf.
when the silence is broken.. start record for 5 secs.

i hope this help.
;)

bigjim

  • Posts: 232
Re: detecting amplitude  threshold on the RECORDCH
« Reply #3 on: 26 Aug '03 - 23:41 »
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

  • Posts: 71
Re: detecting amplitude  threshold on the RECORDCH
« Reply #4 on: 27 Aug '03 - 03:59 »
Code: [Select]

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

bigjim

  • Posts: 232
Re: detecting amplitude  threshold on the RECORDCH
« Reply #5 on: 27 Aug '03 - 12:31 »
Sorry its in delphi 4

Sam

  • Guest
Re: detecting amplitude  threshold on the RECORDCH
« Reply #6 on: 27 Aug '03 - 19:49 »
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,