Spaces:
Sleeping
Sleeping
update
Browse files- nx_vad/nx_vad.go +3 -1
- silero_vad/main.go +1 -1
nx_vad/nx_vad.go
CHANGED
@@ -11,11 +11,13 @@ func main () {
|
|
11 |
filenamePtr := flag.String("filename", "", "input wav audio file")
|
12 |
silenceTimePtr := flag.Float64("silence_time", 0.0, "silence time in seconds")
|
13 |
longestActivatePtr := flag.Float64("longest_activate", 0.0, "longest activate time in seconds")
|
|
|
14 |
flag.Parse()
|
15 |
|
16 |
var filename string = *filenamePtr
|
17 |
var silenceTime float32 = float32(*silenceTimePtr)
|
18 |
var longestActivate float32 = float32(*longestActivatePtr)
|
|
|
19 |
fmt.Println(filename)
|
20 |
|
21 |
var wavInfo audio.WavInfoType
|
@@ -43,7 +45,7 @@ func main () {
|
|
43 |
count := uint32(0)
|
44 |
|
45 |
sv := streaming_vad.StreamingVadType{}
|
46 |
-
sv.Init(
|
47 |
|
48 |
var begin uint32
|
49 |
var end uint32
|
|
|
11 |
filenamePtr := flag.String("filename", "", "input wav audio file")
|
12 |
silenceTimePtr := flag.Float64("silence_time", 0.0, "silence time in seconds")
|
13 |
longestActivatePtr := flag.Float64("longest_activate", 0.0, "longest activate time in seconds")
|
14 |
+
sampleRatePtr := flag.Int("sample_rate", 8000, "sample rate")
|
15 |
flag.Parse()
|
16 |
|
17 |
var filename string = *filenamePtr
|
18 |
var silenceTime float32 = float32(*silenceTimePtr)
|
19 |
var longestActivate float32 = float32(*longestActivatePtr)
|
20 |
+
var sampleRate uint32 = int(*sampleRatePtr)
|
21 |
fmt.Println(filename)
|
22 |
|
23 |
var wavInfo audio.WavInfoType
|
|
|
45 |
count := uint32(0)
|
46 |
|
47 |
sv := streaming_vad.StreamingVadType{}
|
48 |
+
sv.Init(sampleRate, silenceTime, longestActivate)
|
49 |
|
50 |
var begin uint32
|
51 |
var end uint32
|
silero_vad/main.go
CHANGED
@@ -21,7 +21,7 @@ func main() {
|
|
21 |
var filename string = *filenamePtr
|
22 |
var silenceTime float32 = float32(*silenceTimePtr)
|
23 |
var speechPadTime float32 = float32(*speechPadTimePtr)
|
24 |
-
var sampleRate int =
|
25 |
fmt.Println(filename)
|
26 |
|
27 |
var silenceTimeMs int = int(silenceTime * 1e3)
|
|
|
21 |
var filename string = *filenamePtr
|
22 |
var silenceTime float32 = float32(*silenceTimePtr)
|
23 |
var speechPadTime float32 = float32(*speechPadTimePtr)
|
24 |
+
var sampleRate int = int(*sampleRatePtr)
|
25 |
fmt.Println(filename)
|
26 |
|
27 |
var silenceTimeMs int = int(silenceTime * 1e3)
|