mirror of
https://github.com/snakers4/silero-vad.git
synced 2026-02-05 18:09:22 +08:00
Polish hubconf file
This commit is contained in:
25
hubconf.py
25
hubconf.py
@@ -1,28 +1,25 @@
|
|||||||
dependencies = ['torch', 'torchaudio', 'numpy']
|
dependencies = ['torch', 'torchaudio', 'numpy']
|
||||||
import torch
|
import torch
|
||||||
from omegaconf import OmegaConf
|
from omegaconf import OmegaConf
|
||||||
from utils import (init_jit_model,
|
from utils import (init_jit_model,
|
||||||
get_speech_ts,
|
get_speech_ts,
|
||||||
save_audio,
|
save_audio,
|
||||||
read_audio,
|
read_audio,
|
||||||
state_generator,
|
state_generator,
|
||||||
single_audio_stream,
|
single_audio_stream,
|
||||||
collect_speeches)
|
collect_speeches)
|
||||||
|
|
||||||
|
|
||||||
def silero_stt(**kwargs):
|
def silero_vad(**kwargs):
|
||||||
"""Silero Voice Activity and Number Detector Models
|
"""Silero Voice Activity Detector, Number Detector and Language Classifier
|
||||||
Returns a model and a set of utils
|
Returns a model with a set of utils
|
||||||
Please see https://github.com/snakers4/silero-vad for usage examples
|
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',
|
model = init_jit_model(model_path='files/model.jit')
|
||||||
'files/model.jit',
|
|
||||||
progress=False)
|
|
||||||
model = init_jit_model(model_url='files/model.jit')
|
|
||||||
utils = (get_speech_ts,
|
utils = (get_speech_ts,
|
||||||
save_audio,
|
save_audio,
|
||||||
read_audio,
|
read_audio,
|
||||||
state_generator,
|
state_generator,
|
||||||
single_audio_stream,
|
single_audio_stream,
|
||||||
collect_speeches)
|
collect_speeches)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user