From ab55c0d7382646d853b32cafe358bfc85f204a26 Mon Sep 17 00:00:00 2001 From: snakers41 Date: Tue, 15 Dec 2020 12:42:56 +0000 Subject: [PATCH] Polish hubconf file --- hubconf.py | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/hubconf.py b/hubconf.py index a444dd5..eb26625 100644 --- a/hubconf.py +++ b/hubconf.py @@ -1,28 +1,25 @@ dependencies = ['torch', 'torchaudio', 'numpy'] import torch from omegaconf import OmegaConf -from utils import (init_jit_model, +from utils import (init_jit_model, get_speech_ts, - save_audio, - read_audio, - state_generator, + save_audio, + read_audio, + state_generator, single_audio_stream, collect_speeches) -def silero_stt(**kwargs): - """Silero Voice Activity and Number Detector Models - Returns a model and a set of utils +def silero_vad(**kwargs): + """Silero Voice Activity Detector, Number Detector and Language Classifier + Returns a model with a set of utils Please see https://github.com/snakers4/silero-vad for usage examples """ - torch.hub.download_url_to_file('https://raw.githubusercontent.com/snakers4/silero-vad/master/files/model.jit', - 'files/model.jit', - progress=False) - model = init_jit_model(model_url='files/model.jit') + model = init_jit_model(model_path='files/model.jit') utils = (get_speech_ts, - save_audio, - read_audio, - state_generator, + save_audio, + read_audio, + state_generator, single_audio_stream, collect_speeches)