Documentation
¶
Overview ¶
Package vad provides lightweight RMS-based voice activity hints for sip1 barge-in (interrupt TTS / local WAV toward the callee while synthetic audio is playing).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Detector ¶
type Detector struct {
// contains filtered or unexported fields
}
Detector performs energy-based (RMS) gating suitable for barge-in while downlink synthesis plays.
func NewDetector ¶
func NewDetector() *Detector
NewDetector builds a detector with sipold-aligned defaults.
func (*Detector) CheckBargeIn ¶
CheckBargeIn returns true when uplink PCM suggests the user is speaking during synthesis playback. pcmData must be 16-bit little-endian mono PCM (typically 20 ms @ 16 kHz from the sip1 decode path).
func (*Detector) SetConsecutiveFrames ¶
SetConsecutiveFrames sets how many consecutive over-threshold frames trigger barge-in.
func (*Detector) SetEnabled ¶
SetEnabled turns detection on/off.
func (*Detector) SetThreshold ¶
SetThreshold sets the RMS ceiling used with adaptive noise tracking.