Documentation
¶
Overview ¶
Package vadproc is the voice-activity-detection pipeline processor. It drives a vad.Analyzer over incoming audio and emits the raw VAD frames the turn subsystem consumes: VADUserStartedSpeakingFrame and VADUserStoppedSpeakingFrame on speech onset/offset, plus a periodic UserSpeakingFrame while the user speaks. It does not decide turns — that is the turns package's job.
Place it just after the input transport. The analyzer runs at the input sample rate when it supports it — so Silero runs natively on 8 kHz telephony audio, not an upsampled copy — and only resamples to 16 kHz when the input rate is rejected. The original input audio is always forwarded downstream unchanged so STT and the turn analyzer still see it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// VAD detects voice activity. Required.
VAD vad.Analyzer
// SpeechActivityPeriod is how often a UserSpeakingFrame is emitted while the
// user is speaking; 0 uses 200ms, a negative value disables the keepalive.
SpeechActivityPeriod time.Duration
}
Config configures a Processor.