daihui.zhang commited on
Commit
2401225
·
1 Parent(s): 31ad35a

update vad parameter

Browse files
moyoyo_asr_models/silero_vad.onnx DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:2623a2953f6ff3d2c1e61740c6cdb7168133479b267dfef114a4a3cc5bdd788f
3
- size 2327524
 
 
 
 
transcribe/helpers/vadprocessor.py CHANGED
@@ -1,7 +1,7 @@
1
  from copy import deepcopy
2
  from queue import Queue, Empty
3
  from time import time
4
- from config import MODEL_DIR
5
  # from silero_vad import load_silero_vad
6
  import numpy as np
7
  import onnxruntime
@@ -109,7 +109,7 @@ class VADIteratorOnnx:
109
  min_silence_duration_ms: int = 100,
110
  max_speech_duration_s: float = float('inf'),
111
  ):
112
- self.model = OnnxWrapper(MODEL_DIR/ "silero_vad.onnx", True)
113
  self.threshold = threshold
114
  self.sampling_rate = sampling_rate
115
 
@@ -274,7 +274,7 @@ class VadProcessor:
274
  def __init__(
275
  self,
276
  prob_threshold=0.5,
277
- silence_s=0.5,
278
  cache_s=0.25,
279
  sr=16000
280
  ):
 
1
  from copy import deepcopy
2
  from queue import Queue, Empty
3
  from time import time
4
+ from config import VAD_MODEL_PATH
5
  # from silero_vad import load_silero_vad
6
  import numpy as np
7
  import onnxruntime
 
109
  min_silence_duration_ms: int = 100,
110
  max_speech_duration_s: float = float('inf'),
111
  ):
112
+ self.model = OnnxWrapper(VAD_MODEL_PATH, True)
113
  self.threshold = threshold
114
  self.sampling_rate = sampling_rate
115
 
 
274
  def __init__(
275
  self,
276
  prob_threshold=0.5,
277
+ silence_s=0.3,
278
  cache_s=0.25,
279
  sr=16000
280
  ):