467,184 Members | 1,214 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,184 developers. It's quick & easy.

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

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
Nov 21 '05 #1
  • viewed: 1553
Share:
1 Reply
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" <sp******@annetsite.com> escribió en el mensaje
news:Ol*************@TK2MSFTNGP10.phx.gbl...
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

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

23 posts views Thread by David McCulloch | last post: by
6 posts views Thread by Dovelet | last post: by
8 posts views Thread by John Buckley | last post: by
5 posts views Thread by Dmitriy Lapshin [C# / .NET MVP] | last post: by
3 posts views Thread by carthia | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.