Skip to content

Commit

Permalink
Merge pull request #11 from kisasexypantera94/master
Browse files Browse the repository at this point in the history
Add `SetThreshold` method
  • Loading branch information
streamer45 authored Jul 15, 2024
2 parents 8cecfac + 91200eb commit eaaec6e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions speech/detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ func (sd *Detector) Reset() error {
return nil
}

func (sd *Detector) SetThreshold(value float32) {
sd.cfg.Threshold = value
}

func (sd *Detector) Destroy() error {
if sd == nil {
return fmt.Errorf("invalid nil detector")
Expand Down

0 comments on commit eaaec6e

Please sign in to comment.