vad

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: AGPL-3.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Monitor

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

func NewMonitor

func NewMonitor(cfg MonitorConfig, cb VoiceCB) (*Monitor, error)

func (*Monitor) PushAudioLevel

func (m *Monitor) PushAudioLevel(level uint8)

func (*Monitor) Reset

func (m *Monitor) Reset()

type MonitorConfig

type MonitorConfig struct {
	VoiceLevelsSampleSize      int
	ActivationDuration         time.Duration
	VoiceActivationThreshold   int
	VoiceDeactivationThreshold int
}

func (MonitorConfig) IsValid

func (c MonitorConfig) IsValid() error

func (MonitorConfig) SetDefaults

func (c MonitorConfig) SetDefaults() MonitorConfig

type VoiceCB

type VoiceCB func(voice bool)

Jump to

Keyboard shortcuts

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