|
1 | 1 | { |
2 | 2 | "cells": [ |
3 | 3 | { |
4 | | - "attachments": {}, |
5 | 4 | "cell_type": "markdown", |
6 | 5 | "metadata": {}, |
7 | 6 | "source": [ |
|
18 | 17 | "SAMPLING_RATE = 16000\n", |
19 | 18 | "import torch\n", |
20 | 19 | "from pprint import pprint\n", |
| 20 | + "import time\n", |
| 21 | + "import shutil\n", |
21 | 22 | "\n", |
22 | 23 | "torch.set_num_threads(1)\n", |
23 | 24 | "NUM_PROCESS=4 # set to the number of CPU cores in the machine\n", |
24 | 25 | "NUM_COPIES=8\n", |
25 | 26 | "# download wav files, make multiple copies\n", |
26 | | - "for idx in range(NUM_COPIES):\n", |
27 | | - " torch.hub.download_url_to_file('https://models.silero.ai/vad_models/en.wav', f\"en_example{idx}.wav\")\n" |
| 27 | + "torch.hub.download_url_to_file('https://models.silero.ai/vad_models/en.wav', f\"en_example0.wav\")\n", |
| 28 | + "for idx in range(NUM_COPIES-1):\n", |
| 29 | + " shutil.copy(f\"en_example0.wav\", f\"en_example{idx+1}.wav\")" |
28 | 30 | ] |
29 | 31 | }, |
30 | 32 | { |
31 | | - "attachments": {}, |
32 | 33 | "cell_type": "markdown", |
33 | 34 | "metadata": {}, |
34 | 35 | "source": [ |
|
54 | 55 | ] |
55 | 56 | }, |
56 | 57 | { |
57 | | - "attachments": {}, |
58 | 58 | "cell_type": "markdown", |
59 | 59 | "metadata": {}, |
60 | 60 | "source": [ |
|
99 | 99 | ] |
100 | 100 | }, |
101 | 101 | { |
102 | | - "attachments": {}, |
103 | 102 | "cell_type": "markdown", |
104 | 103 | "metadata": {}, |
105 | 104 | "source": [ |
|
127 | 126 | ], |
128 | 127 | "metadata": { |
129 | 128 | "kernelspec": { |
130 | | - "display_name": "diarization", |
| 129 | + "display_name": "Python 3 (ipykernel)", |
131 | 130 | "language": "python", |
132 | 131 | "name": "python3" |
133 | 132 | }, |
|
141 | 140 | "name": "python", |
142 | 141 | "nbconvert_exporter": "python", |
143 | 142 | "pygments_lexer": "ipython3", |
144 | | - "version": "3.9.15" |
| 143 | + "version": "3.10.14" |
| 144 | + }, |
| 145 | + "toc": { |
| 146 | + "base_numbering": 1, |
| 147 | + "nav_menu": {}, |
| 148 | + "number_sections": true, |
| 149 | + "sideBar": true, |
| 150 | + "skip_h1_title": false, |
| 151 | + "title_cell": "Table of Contents", |
| 152 | + "title_sidebar": "Contents", |
| 153 | + "toc_cell": false, |
| 154 | + "toc_position": {}, |
| 155 | + "toc_section_display": true, |
| 156 | + "toc_window_display": false |
145 | 157 | } |
146 | 158 | }, |
147 | 159 | "nbformat": 4, |
|
0 commit comments