mirror of
https://github.com/snakers4/silero-vad.git
synced 2026-02-05 18:09:22 +08:00
@@ -1,7 +1,6 @@
|
|||||||
dependencies = ['torch', 'torchaudio']
|
dependencies = ['torch', 'torchaudio']
|
||||||
import torch
|
import torch
|
||||||
import json
|
import json
|
||||||
import warnings
|
|
||||||
from utils_vad import (init_jit_model,
|
from utils_vad import (init_jit_model,
|
||||||
get_speech_timestamps,
|
get_speech_timestamps,
|
||||||
get_number_ts,
|
get_number_ts,
|
||||||
@@ -30,7 +29,7 @@ def silero_vad(onnx=False, force_onnx_cpu=False):
|
|||||||
installed_version = torch.__version__
|
installed_version = torch.__version__
|
||||||
supported_version = '1.12.0'
|
supported_version = '1.12.0'
|
||||||
if versiontuple(installed_version) < versiontuple(supported_version):
|
if versiontuple(installed_version) < versiontuple(supported_version):
|
||||||
warnings.warn(f'Please install torch {supported_version} or greater ({installed_version} installed)')
|
raise Exception(f'Please install torch {supported_version} or greater ({installed_version} installed)')
|
||||||
|
|
||||||
hub_dir = torch.hub.get_dir()
|
hub_dir = torch.hub.get_dir()
|
||||||
if onnx:
|
if onnx:
|
||||||
|
|||||||
Reference in New Issue
Block a user