some background information:
my task is to control a voice recorder:
incoming rtp stream has to be stored in wav file only in case of voice
activity can be observed on the incoming stream.
Regarding to VAD I have found the following pjsip Forum entry from 2008:
Tue Apr 8 06:38:38 EDT 2008
Assuming you are talking about microphone silence detection,
currently there is no callback/trigger mechanism for silence detection.
However, you have some alternatives to do this:
1. Monitor the rx_level of sound port (normally slot 0) in the
See pjmedia_conf_get_signal_level() API.
2. Implement a pjmedia port that utilize existing silence detector to
do callback when such conditions are reached (e.g: start silence, start
Then, this port can be stacked to any port you would like to monitor
(in this case, sound port). The port connection will be about:
conference bridge <--> silencedet port <--> sound port.
We will be glad if somebody would implement the second alternative and
share the implementation to us.
regarding to "Alternative 2": have been already implemented any
enhancements since 2008?
If yes: can you give me some links where to find them and some examples how
to integrate it?
If no: can you give me some more details on pjmedia port implementation to
utilize the existing silence detector?
Thank you in advance:
On Fri, Jun 16, 2017 at 12:06 PM, Gabor K firstname.lastname@example.org wrote:
I am wondering how to use/integrate Voice Activity Detector of pj's
codecs, e.g.: G.711.
I have found the pjmedia_silence_det_detect() API but I can not find any
example code which shows how to use it.
Can you give me some pointers or some short advises?
Did you get your VAD issue resolved? I have the same issue and cannot
find any example code nor doc on how to "stack" audio ports.
Any help would be greatly appreciated.