vad

package
v0.35.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SampleRate     = 16000
	FrameSize      = 512
	BytesPerSample = 2
	FrameBytes     = FrameSize * BytesPerSample
)

Variables

View Source
var ErrUnavailable = errors.New("vad: silero VAD temporarily unavailable on this build — tracked in beads (replace yalue/onnxruntime_go usage with sherpa-onnx VAD to avoid double-runtime conflict)")

ErrUnavailable is returned by NewSileroVAD until VAD is re-implemented on the unified sherpa-onnx runtime. See package-level note for rationale.

Functions

This section is empty.

Types

type Detector

type Detector interface {
	ProcessFrame([]int16) (float32, error)
	Reset()
}

Detector is the speech-probability contract consumed by dictation processors.

type SileroVAD

type SileroVAD struct {
	// contains filtered or unexported fields
}

SileroVAD is the public type the package previously exported. Kept as an empty struct so callers compile; constructor returns ErrUnavailable.

func NewSileroVAD

func NewSileroVAD(_ string) (*SileroVAD, error)

NewSileroVAD always returns ErrUnavailable in this build. Adapters (cmd/speechkit/dictation_session.go) detect the error, log a warning and degrade to manual-release hotkey behaviour.

func (*SileroVAD) Close

func (v *SileroVAD) Close()

Close is a no-op for the stub.

func (*SileroVAD) ProcessFrame

func (v *SileroVAD) ProcessFrame(_ []int16) (float32, error)

ProcessFrame is a no-op for the stub. The real implementation will return the speech probability from the sherpa-onnx VAD model.

func (*SileroVAD) Reset

func (v *SileroVAD) Reset()

Reset is a no-op for the stub.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL