HoneyTian commited on
Commit
5a74d6f
1 Parent(s): 45a808d
Files changed (2) hide show
  1. main.py +1 -1
  2. silero_vad/main.go +6 -1
main.py CHANGED
@@ -130,7 +130,7 @@ def main():
130
  uploaded_vad_engine = gr.Dropdown(choices=["nx_vad", "silero_vad"], value="nx_vad", label="vad_engine")
131
  uploaded_silence_time = gr.Slider(minimum=0.0, maximum=1.0, value=0.3, step=0.01, label="silence_time")
132
  uploaded_longest_activate = gr.Slider(minimum=0.0, maximum=20.0, value=3.0, step=0.1, label="longest_activate")
133
- uploaded_speech_pad_time = gr.Slider(minimum=0.0, maximum=20.0, value=3.0, step=0.1, label="speech_pad_time")
134
  uploaded_threshold = gr.Slider(minimum=0.0, maximum=1.0, value=0.5, step=0.1, label="threshold")
135
  upload_button = gr.Button("Run VAD", variant="primary")
136
 
 
130
  uploaded_vad_engine = gr.Dropdown(choices=["nx_vad", "silero_vad"], value="nx_vad", label="vad_engine")
131
  uploaded_silence_time = gr.Slider(minimum=0.0, maximum=1.0, value=0.3, step=0.01, label="silence_time")
132
  uploaded_longest_activate = gr.Slider(minimum=0.0, maximum=20.0, value=3.0, step=0.1, label="longest_activate")
133
+ uploaded_speech_pad_time = gr.Slider(minimum=0.00, maximum=0.50, value=0.03, step=0.01, label="speech_pad_time")
134
  uploaded_threshold = gr.Slider(minimum=0.0, maximum=1.0, value=0.5, step=0.1, label="threshold")
135
  upload_button = gr.Button("Run VAD", variant="primary")
136
 
silero_vad/main.go CHANGED
@@ -24,11 +24,16 @@ func main() {
24
  var speechPadTime float32 = float32(*speechPadTimePtr)
25
  var sampleRate int = int(*sampleRatePtr)
26
  var threshold float32 = float32(*thresholdPtr)
27
- fmt.Println(filename)
28
 
29
  var silenceTimeMs int = int(silenceTime * 1e3)
30
  var speechPadTimeMs int = int(speechPadTime * 1e3)
31
 
 
 
 
 
 
 
32
  sd, err := speech.NewDetector(speech.DetectorConfig{
33
  ModelPath: modelPath,
34
  SampleRate: sampleRate,
 
24
  var speechPadTime float32 = float32(*speechPadTimePtr)
25
  var sampleRate int = int(*sampleRatePtr)
26
  var threshold float32 = float32(*thresholdPtr)
 
27
 
28
  var silenceTimeMs int = int(silenceTime * 1e3)
29
  var speechPadTimeMs int = int(speechPadTime * 1e3)
30
 
31
+ fmt.Println(filename)
32
+ fmt.Printf("silenceTimeMs: %d\n", silenceTimeMs)
33
+ fmt.Printf("speechPadTimeMs: %d\n", speechPadTimeMs)
34
+ fmt.Printf("sampleRate: %d\n", sampleRate)
35
+ fmt.Printf("threshold: %0.2f\n", threshold)
36
+
37
  sd, err := speech.NewDetector(speech.DetectorConfig{
38
  ModelPath: modelPath,
39
  SampleRate: sampleRate,