mirror of
https://github.com/snakers4/silero-vad.git
synced 2026-02-05 18:09:22 +08:00
100ms compatible models
This commit is contained in:
BIN
files/model.jit
BIN
files/model.jit
Binary file not shown.
BIN
files/model.onnx
BIN
files/model.onnx
Binary file not shown.
8
utils.py
8
utils.py
@@ -52,7 +52,7 @@ def init_jit_model(model_path: str,
|
|||||||
def get_speech_ts(wav: torch.Tensor,
|
def get_speech_ts(wav: torch.Tensor,
|
||||||
model,
|
model,
|
||||||
trig_sum: float = 0.25,
|
trig_sum: float = 0.25,
|
||||||
neg_trig_sum: float = 0.1,
|
neg_trig_sum: float = 0.07,
|
||||||
num_steps: int = 8,
|
num_steps: int = 8,
|
||||||
batch_size: int = 200,
|
batch_size: int = 200,
|
||||||
run_function=validate):
|
run_function=validate):
|
||||||
@@ -107,7 +107,7 @@ def get_speech_ts(wav: torch.Tensor,
|
|||||||
class VADiterator:
|
class VADiterator:
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
trig_sum: float = 0.26,
|
trig_sum: float = 0.26,
|
||||||
neg_trig_sum: float = 0.1,
|
neg_trig_sum: float = 0.07,
|
||||||
num_steps: int = 8):
|
num_steps: int = 8):
|
||||||
self.num_samples = 4000
|
self.num_samples = 4000
|
||||||
self.num_steps = num_steps
|
self.num_steps = num_steps
|
||||||
@@ -168,7 +168,7 @@ def state_generator(model,
|
|||||||
audios: List[str],
|
audios: List[str],
|
||||||
onnx: bool = False,
|
onnx: bool = False,
|
||||||
trig_sum: float = 0.26,
|
trig_sum: float = 0.26,
|
||||||
neg_trig_sum: float = 0.1,
|
neg_trig_sum: float = 0.07,
|
||||||
num_steps: int = 8,
|
num_steps: int = 8,
|
||||||
audios_in_stream: int = 2,
|
audios_in_stream: int = 2,
|
||||||
run_function=validate):
|
run_function=validate):
|
||||||
@@ -227,7 +227,7 @@ def single_audio_stream(model,
|
|||||||
audio: str,
|
audio: str,
|
||||||
onnx: bool = False,
|
onnx: bool = False,
|
||||||
trig_sum: float = 0.26,
|
trig_sum: float = 0.26,
|
||||||
neg_trig_sum: float = 0.1,
|
neg_trig_sum: float = 0.07,
|
||||||
num_steps: int = 8,
|
num_steps: int = 8,
|
||||||
run_function=validate):
|
run_function=validate):
|
||||||
num_samples = 4000
|
num_samples = 4000
|
||||||
|
|||||||
Reference in New Issue
Block a user