mirror of
https://github.com/snakers4/silero-vad.git
synced 2026-02-05 18:09:22 +08:00
Update to support model v5
This commit is contained in:
@@ -13,7 +13,6 @@ func main() {
|
||||
sd, err := speech.NewDetector(speech.DetectorConfig{
|
||||
ModelPath: "../../files/silero_vad.onnx",
|
||||
SampleRate: 16000,
|
||||
WindowSize: 1536,
|
||||
Threshold: 0.5,
|
||||
MinSilenceDurationMs: 0,
|
||||
SpeechPadMs: 0,
|
||||
@@ -22,6 +21,10 @@ func main() {
|
||||
log.Fatalf("failed to create speech detector: %s", err)
|
||||
}
|
||||
|
||||
if len(os.Args) != 2 {
|
||||
log.Fatalf("invalid arguments provided: expecting one file path")
|
||||
}
|
||||
|
||||
f, err := os.Open(os.Args[1])
|
||||
if err != nil {
|
||||
log.Fatalf("failed to open sample audio file: %s", err)
|
||||
|
||||
Reference in New Issue
Block a user