mirror of
https://github.com/snakers4/silero-vad.git
synced 2026-02-05 01:49:22 +08:00
fix typos
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
"from pprint import pprint\n",
|
||||
"torch.set_num_threads(1)\n",
|
||||
"# download wav files, make multiple copies\n",
|
||||
"for idx in range(10):\n",
|
||||
"for idx in range(4):\n",
|
||||
" torch.hub.download_url_to_file('https://models.silero.ai/vad_models/en.wav', f\"en_example{idx}.wav\")\n"
|
||||
]
|
||||
},
|
||||
@@ -41,7 +41,7 @@
|
||||
"model, utils = torch.hub.load(repo_or_dir='snakers4/silero-vad',\n",
|
||||
" model='silero_vad',\n",
|
||||
" force_reload=True,\n",
|
||||
" onnx=USE_ONNX)\n",
|
||||
" onnx=False)\n",
|
||||
"\n",
|
||||
"(get_speech_timestamps,\n",
|
||||
" save_audio,\n",
|
||||
@@ -66,7 +66,7 @@
|
||||
"source": [
|
||||
"def vad_process(audio_file: str):\n",
|
||||
" with torch.no_grad():\n",
|
||||
" wav = read_audio(audio_file, sample_rate=SAMPLING_RATE)\n",
|
||||
" wav = read_audio(audio_file, sampling_rate=SAMPLING_RATE)\n",
|
||||
" return get_speech_timestamps(\n",
|
||||
" wav,\n",
|
||||
" model,\n",
|
||||
@@ -98,7 +98,7 @@
|
||||
"\n",
|
||||
"futures = []\n",
|
||||
"with ProcessPoolExecutor(max_workers=4) as ex:\n",
|
||||
" for i in range(10):\n",
|
||||
" for i in range(4):\n",
|
||||
" futures.append(ex.submit(vad_process, f\"en_example{idx}.wav\"))\n",
|
||||
"\n",
|
||||
"for finished in as_completed(futures):\n",
|
||||
|
||||
Reference in New Issue
Block a user