Documentation
¶
Overview ¶
Package vad is a line-by-line Go port of WebRTC's voice activity detector (chromium/webrtc common_audio/vad/, BSD-3-Clause, Copyright (c) 2012 The WebRTC project authors): the allpass filter bank, log energy features, GMM classifier and adaptive model update. A Detector yields one log-likelihood ratio per 10 ms frame and Deciders threshold that one stream.
Index ¶
Constants ¶
const FrameSamples = 80
FrameSamples is 10 ms of 8 kHz mono PCM, the frame Detector.LLR reads.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decider ¶
type Decider struct {
// contains filtered or unexported fields
}
Decider turns one stream's ratios into speech decisions: a ratio at or above its threshold is speech, and so are the overhang frames after it.
func NewDecider ¶
NewDecider returns a decider with the given threshold and an overhang of that many frames.
type Detector ¶
type Detector struct {
// contains filtered or unexported fields
}
Detector reads one 8 kHz mono stream frame by frame. It is not safe for concurrent use.
func NewDetector ¶
func NewDetector() *Detector
NewDetector returns a mode 3 detector whose model adapts at the smallest step the fixed point allows.