mirror of
https://github.com/snakers4/silero-vad.git
synced 2026-02-05 01:49:22 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84768cefdf | ||
|
|
6de3660f25 | ||
|
|
d9a6941852 |
@@ -3,7 +3,7 @@ requires = ["hatchling"]
|
|||||||
build-backend = "hatchling.build"
|
build-backend = "hatchling.build"
|
||||||
[project]
|
[project]
|
||||||
name = "silero-vad"
|
name = "silero-vad"
|
||||||
version = "5.0.1b3"
|
version = "5.1"
|
||||||
authors = [
|
authors = [
|
||||||
{name="Silero Team", email="hello@silero.ai"},
|
{name="Silero Team", email="hello@silero.ai"},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -43,20 +43,30 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
|
"USE_PIP = True # download model using pip package or torch.hub\n",
|
||||||
"USE_ONNX = False # change this to True if you want to test onnx model\n",
|
"USE_ONNX = False # change this to True if you want to test onnx model\n",
|
||||||
"if USE_ONNX:\n",
|
"if USE_ONNX:\n",
|
||||||
" !pip install -q onnxruntime\n",
|
" !pip install -q onnxruntime\n",
|
||||||
|
"if USE_PIP:\n",
|
||||||
|
" !pip install -q silero-vad\n",
|
||||||
|
" from silero_vad import (load_silero_vad,\n",
|
||||||
|
" read_audio,\n",
|
||||||
|
" get_speech_timestamps,\n",
|
||||||
|
" save_audio,\n",
|
||||||
|
" VADIterator,\n",
|
||||||
|
" collect_chunks)\n",
|
||||||
|
" model = load_silero_vad(onnx=USE_ONNX)\n",
|
||||||
|
"else:\n",
|
||||||
|
" model, utils = torch.hub.load(repo_or_dir='snakers4/silero-vad',\n",
|
||||||
|
" model='silero_vad',\n",
|
||||||
|
" force_reload=True,\n",
|
||||||
|
" onnx=USE_ONNX)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"model, utils = torch.hub.load(repo_or_dir='snakers4/silero-vad',\n",
|
" (get_speech_timestamps,\n",
|
||||||
" model='silero_vad',\n",
|
" save_audio,\n",
|
||||||
" force_reload=True,\n",
|
" read_audio,\n",
|
||||||
" onnx=USE_ONNX)\n",
|
" VADIterator,\n",
|
||||||
"\n",
|
" collect_chunks) = utils"
|
||||||
"(get_speech_timestamps,\n",
|
|
||||||
" save_audio,\n",
|
|
||||||
" read_audio,\n",
|
|
||||||
" VADIterator,\n",
|
|
||||||
" collect_chunks) = utils"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user