[Asterisk-Users] Voice detection
Paul Liew
pliew at atp.org.au
Sat Oct 4 00:22:11 MST 2003
You can also use the AGI interface function "RECORD FILE" and specify a max
record duration of 5s and silence detection of 1s. Time the duration of the
call to asterisk - if its longer than 1 second you know you've got voice. If
you need to check for voice over a longer period of time - repeat the call x
times. This way you'll wait for approx 'x' seconds for voice or silence.
I've done this using some "C" code and works very well as a "grunt"
detector - timing out after 5 seconds of silence or returning immediately
when voice is received.
Paul
----- Original Message -----
From: "Christian Hecimovic" <checimovic at qworks.ca>
To: <asterisk-users at lists.digium.com>
Sent: Saturday, October 04, 2003 10:39 AM
Subject: Re: [Asterisk-Users] Voice detection
> dsp.c has silence detection that works quite well for detecting
end-of-voice
> silence. It is used to allow only a certain amount of silence at the end
of
> voicemails, for instance. See app_voicemail2.c on how to use it,
specifically
> the function play_and_record(). Note that the silence threshold (how
> sensitive you are to silence) is read in from the voicemail.conf file.
>
> Since the silence detection stuff has a nice public API, you can use it
for
> any app you write. See app_skel.c for a basic "shell", and follow
something
> like app_voicemail2.c. Read in the acceptable values for threshold and so
> forth from a configuration file (there is a nice Asterisk API for this,
> also), and you're set. For your purposes (playing a file after detecting
> silence in a remote voice stream), such an app should be quite simple.
>
> Christian
>
More information about the asterisk-users
mailing list