Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Detector ¶
type Detector struct {
// contains filtered or unexported fields
}
func NewDetector ¶
func NewDetector(cfg DetectorConfig) (*Detector, error)
func (*Detector) SetThreshold ¶
type DetectorConfig ¶
type DetectorConfig struct {
// The path to the ONNX Silero VAD model file to load.
ModelPath string
// The sampling rate of the input audio samples. Supported values are 8000 and 16000.
SampleRate int
// The probability threshold above which we detect speech. A good default is 0.5.
Threshold float32
// The duration of silence to wait for each speech segment before separating it.
MinSilenceDurationMs int
// The padding to add to speech segments to avoid aggressive cutting.
SpeechPadMs int
// The loglevel for the onnx environment, by default it is set to LogLevelWarn.
LogLevel LogLevel
}
func (DetectorConfig) IsValid ¶
func (c DetectorConfig) IsValid() error
type LogLevel ¶
type LogLevel int
func (LogLevel) OrtLoggingLevel ¶
func (l LogLevel) OrtLoggingLevel() C.OrtLoggingLevel
Click to show internal directories.
Click to hide internal directories.