Is there any API function that can detect the silence or recording?

  • Thread starter Thread starter Sakharam Phapale
  • Start date Start date
S

Sakharam Phapale

Hi All,



I am developing an application like sound recorder.

While recording if there is a silence for more than given time (say 5
seconds),

Recording should be paused.



Is there any API function that can detect the silence or recording?



Thanks in advance,



Sakharam Phapale
 
What you need is a Noise Gate.
You may find a filter that can be used with DirectX, but it will not stop
recording, just silence the data. So, it is better to do it yourself:

You should inspect the recorded audio data, and compare to a treshold.

If it is more than your "silence" level. You keep recording, if it is less
then you stop recording.
You may auto-adjust the silence level to acomodate different recording
ambients.

Remember you have positive and negative values in the data, for this
purposes you just take the absolute of the samples, average some samples and
compare.

Also try to start and stop when the signal level is at zero, to prevent
clicks. Or better yet, apply a short fade in and fade out.

best regards,
Alejandro Lapeyre

"Sakharam Phapale" <[email protected]> escribió en el mensaje
Hi All,



I am developing an application like sound recorder.

While recording if there is a silence for more than given time (say 5
seconds),

Recording should be paused.



Is there any API function that can detect the silence or recording?



Thanks in advance,



Sakharam Phapale
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top