csukuangfj commited on
Commit
e20c448
·
1 Parent(s): 4e6f756

update vad config

Browse files
Files changed (1) hide show
  1. model.py +3 -1
model.py CHANGED
@@ -251,9 +251,11 @@ def get_vad() -> sherpa_onnx.VoiceActivityDetector:
251
 
252
  config = sherpa_onnx.VadModelConfig()
253
  config.silero_vad.model = vad_model
254
- config.silero_vad.min_silence_duration = 0.15
 
255
  config.silero_vad.min_speech_duration = 0.25
256
  config.sample_rate = sample_rate
 
257
 
258
  vad = sherpa_onnx.VoiceActivityDetector(
259
  config,
 
251
 
252
  config = sherpa_onnx.VadModelConfig()
253
  config.silero_vad.model = vad_model
254
+ config.silero_vad.threshold = 0.5
255
+ config.silero_vad.min_silence_duration = 0.25
256
  config.silero_vad.min_speech_duration = 0.25
257
  config.sample_rate = sample_rate
258
+ config.silero_vad.max_speech_duration = 20 # seconds
259
 
260
  vad = sherpa_onnx.VoiceActivityDetector(
261
  config,