mirror of
https://github.com/snakers4/silero-vad.git
synced 2026-02-05 18:09:22 +08:00
add micro model
This commit is contained in:
17
hubconf.py
17
hubconf.py
@@ -29,6 +29,23 @@ def silero_vad(**kwargs):
|
||||
return model, utils
|
||||
|
||||
|
||||
def silero_vad_micro(**kwargs):
|
||||
"""Silero Voice Activity Detector
|
||||
Returns a model with a set of utils
|
||||
Please see https://github.com/snakers4/silero-vad for usage examples
|
||||
"""
|
||||
hub_dir = torch.hub.get_dir()
|
||||
model = init_jit_model(model_path=f'{hub_dir}/snakers4_silero-vad_master/files/model_micro.jit')
|
||||
utils = (get_speech_ts,
|
||||
save_audio,
|
||||
read_audio,
|
||||
state_generator,
|
||||
single_audio_stream,
|
||||
collect_chunks)
|
||||
|
||||
return model, utils
|
||||
|
||||
|
||||
def silero_number_detector(**kwargs):
|
||||
"""Silero Number Detector
|
||||
Returns a model with a set of utils
|
||||
|
||||
Reference in New Issue
Block a user