mirror of
https://github.com/k2-fsa/sherpa-onnx.git
synced 2026-11-11 21:40:58 +08:00
Add APIs about max speech duration in VAD for various programming languages (#1349)
This commit is contained in:
1 parent
1423ddb1f0
commit
e7ffcbd677
31 files changed
+88
-9
No files matched your search
@@ -90,6 +90,15 @@ def main():
|
||||
|
||||
config = sherpa_onnx.VadModelConfig()
|
||||
config.silero_vad.model = args.silero_vad_model
|
||||
config.silero_vad.threshold = 0.5
|
||||
config.silero_vad.min_silence_duration = 0.25 # seconds
|
||||
config.silero_vad.min_speech_duration = 0.25 # seconds
|
||||
|
||||
# If the current segment is larger than this value, then it increases
|
||||
# the threshold to 0.9 internally. After detecting this segment,
|
||||
# it resets the threshold to its original value.
|
||||
config.silero_vad.max_speech_duration = 5 # seconds
|
||||
|
||||
config.sample_rate = sample_rate
|
||||
|
||||
window_size = config.silero_vad.window_size
|
||||
|
||||
Reference in new issue
Block a user