Documentation
¶
Overview ¶
This package provides voice activity detection (VAD) bindings for libfvad, which is the WebRTC VAD as a standalone library.
In order to use this package, you will need to build libfvad, which installs it with the other libraries:
% make libfvad
API Documentation Sources: https://github.com/dpirch/libfvad/blob/master/include/fvad.h
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
func NewContext ¶
func NewContext() *Context
NewContext returns a new VAD instance in MODE_QUALITY, with a sample rate of 8000 Hz, or nil if memory could not be allocated. It should be released with Free. A context isn't safe for concurrent use.
func (*Context) Process ¶
Process returns true if voice is detected in a frame of mono samples, which is 10, 20 or 30 ms long at the sample rate, so for example 160, 320 or 480 samples at 16000 Hz.
func (*Context) Reset ¶
func (context *Context) Reset()
Reset clears all state, and resets the mode and sample rate to defaults.
func (*Context) SetSampleRate ¶
SetSampleRate sets the input sample rate in Hz, which is one of 8000, 16000, 32000 or 48000. Processing is done at 8000 Hz, so input at higher sample rates is downsampled first.
type Mode ¶
type Mode int