mirror of
https://github.com/jambonz/freeswitch-modules.git
synced 2025-12-18 22:27:43 +00:00
* mod_vad_detect Signed-off-by: Hoan HL <quan.luuhoang8@gmail.com> * mod_vad_detect Signed-off-by: Hoan HL <quan.luuhoang8@gmail.com> * wip Signed-off-by: Hoan HL <quan.luuhoang8@gmail.com> * wip Signed-off-by: Hoan HL <quan.luuhoang8@gmail.com> * wip Signed-off-by: Hoan HL <quan.luuhoang8@gmail.com> * wip Signed-off-by: Hoan HL <quan.luuhoang8@gmail.com> * wip Signed-off-by: Hoan HL <quan.luuhoang8@gmail.com> * wip Signed-off-by: Hoan HL <quan.luuhoang8@gmail.com> --------- Signed-off-by: Hoan HL <quan.luuhoang8@gmail.com>
mod_vad_detect
mod_vad_detect is a Freeswitch module designed to detect the start and end points of speech in a conversation.
API
Commands
This Freeswitch module provides the following API commands:
uuid_vad_detect start [one-shot|continuous] mode silence-ms voice-ms [bugname]
This command attaches a media bug to a channel and starts Voice Activity Detection (VAD).
uuid: Unique identifier of the Freeswitch channel.one-shot: Detects the start of speech, sends an event titledvad_detect:start_talking, and ceases listening.continuous: Continuously listens and reports all events, includingvad_detect:start_talkingandvad_detect:stop_talking.mode:- -1 ("disable fvad, use native")
- 0 ("quality")
- 1 ("low bitrate")
- 2 ("aggressive")
- 3 ("very aggressive")
silence-ms: number of milliseconds of silence that must come to transition from talking to stop talkingvoice-ms: number of milliseconds of voice that must come to transition to start talking
uuid_vad_detect stop [bugname]
This command halts VAD detection on the specified channel.
Channel Variables
Events
vad_detect:start_talking: Indicates the detection of the start of speech.vad_detect:stop_talking: Indicates the detection of the end of speech.
Usage
When utilizing drachtio-fsrmf, you can employ this API command via the api method found on the 'endpoint' object. Here is an example:
ep.api('uuid_vad_detect', `${ep.uuid} start one-shot 2 150 250 vad_detect`);