[Freeswitch-dev] VAD, TALK and NOTALK events
Anthony Minessale
anthmct at yahoo.com
Fri Feb 15 09:09:27 EST 2008
The algorithm used is not so great and could stand to be replaced
by a better one if we get the chance.
basically we decode the audio to signed linear 16bit samples
for each packet we receive and iterate the samples and add up the
absolute values then compute the average and compare it to the
acceptable level considered "talking" then we use a counter to make
sure it's in the same state several times in a row before actually
changing the status of the channel to talking or not talking.
A real vad algorithm would also be able to filter out the voice from
the background noise and judge the energy based only on that.
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org
pstn:213-799-1400
----- Original Message ----
From: KMTDBOURSE <kmtdbourse at free.fr>
To: freeswitch-dev at lists.freeswitch.org
Sent: Thursday, February 14, 2008 1:51:55 PM
Subject: Re: [Freeswitch-dev] VAD, TALK and NOTALK events
Hi,
I ma interested in the VAD algorithm used where where is the
code exactly? maybe a link any document support about the vad alogorithm
used therein?
thanks,
Zelda
At 01:47 14/02/2008, Anthony Minessale wrote:
They are enabled by the vad
params in the sofia profile xml
<param name="vad">
Anthony Minessale II
FreeSWITCH
http://www.freeswitch.org/
ClueCon
http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org
pstn:213-799-1400
----- Original Message ----
From: Cesar Cepeda <cesar at auronix.com>
To: freeswitch-dev at lists.freeswitch.org
Sent: Wednesday, February 13, 2008 10:17:23 AM
Subject: Re: [Freeswitch-dev] VAD, TALK and NOTALK events
Please correct me if I’m wrong.
The events are indeed fired, but only if the SWITCH_VAD_FLAG_EVENTS_TALK
or NOTALK flags are set for an rtp_session. I found no place
in the code where those flags are set. That is what I meant by
not being “enabled”.
I subscribed to the events and received nothing. Then I set the
flags on switch_rtp_enable_vad function, and then I started receiving the
events. Perhaps there is another way of doing it that I’m
missing.
Cesar Cepeda.
De: freeswitch-dev-bounces at lists.freeswitch.org
[
mailto:freeswitch-dev-bounces at lists.freeswitch.org] En nombre de
Anthony Minessale
Enviado el: Miércoles, 13 de Febrero de 2008 08:17
Para: freeswitch-dev at lists.freeswitch.org
Asunto: Re: [Freeswitch-dev] VAD, TALK and NOTALK events
The events are fired.
I don't know what you mean by "enabled"
You can either bind an event to a callback
in the load function of your custom module.
or connect to mod_event_socket on tcp
and request "events talk notalk"
void my_event_handler(switch_event_t *event)
{
}
if (switch_event_bind(modname, SWITCH_EVENT_TALK,
SWITCH_EVENT_SUBCLASS_ANY, my_event_handler, NULL)
!= SWITCH_STATUS_SUCCESS)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't
bind!\n");
return
SWITCH_STATUS_GENERR;
}
if (switch_event_bind(modname, SWITCH_EVENT_NOTALK,
SWITCH_EVENT_SUBCLASS_ANY, my_event_handler, NULL)
!= SWITCH_STATUS_SUCCESS)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't
bind!\n");
return
SWITCH_STATUS_GENERR;
}
Anthony Minessale II
FreeSWITCH
http://www.freeswitch.org/
ClueCon
http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net
#freeswitch
FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org
pstn:213-799-1400
----- Original Message ----
From: Cesar Cepeda <cesar at auronix.com>
To: freeswitch-dev at lists.freeswitch.org
Sent: Tuesday, February 12, 2008 6:53:03 PM
Subject: [Freeswitch-dev] VAD, TALK and NOTALK events
Hi,
>From looking at the code of switch_rtp.c I can see that VAD is
done if
enabled in the sip profile in order to not send packets when there is
no
noise. There are also two events {TALK, NOTALK} which can be fired when
VAD
kicks in, nevertheless these two events are enabled nowhere (or at least
I
didn't find a place in the code where they were enabled), so no matter
if
you ask for them you don't receive them. My questions are the
following:
Is there some particular reason for not enabling these two events?
Is the event queue easily overflowed if these two events are
enabled?
Thanks.
Cesar Cepeda.
_______________________________________________
Freeswitch-dev mailing list
Freeswitch-dev at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:
http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
Never miss a thing.
Make
Yahoo your homepage.
-----Inline Attachment Follows-----
_______________________________________________
Freeswitch-dev mailing list
Freeswitch-dev at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:
http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
Looking for last minute shopping deals?
Find them fast with Yahoo! Search.
_______________________________________________
Freeswitch-dev mailing list
Freeswitch-dev at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
-----Inline Attachment Follows-----
_______________________________________________
Freeswitch-dev
mailing
list
Freeswitch-dev at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20080215/8bbb4e78/attachment-0001.html
More information about the Freeswitch-dev
mailing list