|
11 | 11 | }, |
12 | 12 | { |
13 | 13 | "cell_type": "code", |
14 | | - "execution_count": 5, |
| 14 | + "execution_count": null, |
15 | 15 | "metadata": {}, |
16 | 16 | "outputs": [], |
17 | 17 | "source": [ |
|
31 | 31 | }, |
32 | 32 | { |
33 | 33 | "cell_type": "code", |
34 | | - "execution_count": 6, |
| 34 | + "execution_count": null, |
35 | 35 | "metadata": {}, |
36 | | - "outputs": [ |
37 | | - { |
38 | | - "name": "stdout", |
39 | | - "output_type": "stream", |
40 | | - "text": [ |
41 | | - "Clip successfully extracted to: ../data/video/regular_council_meeting___2025_02_26_clip_4-50_to_5-20.mp4\n" |
42 | | - ] |
43 | | - } |
44 | | - ], |
| 36 | + "outputs": [], |
45 | 37 | "source": [ |
46 | 38 | "import subprocess\n", |
47 | 39 | "from pathlib import Path\n", |
|
97 | 89 | }, |
98 | 90 | { |
99 | 91 | "cell_type": "code", |
100 | | - "execution_count": 7, |
| 92 | + "execution_count": null, |
101 | 93 | "metadata": {}, |
102 | | - "outputs": [ |
103 | | - { |
104 | | - "name": "stderr", |
105 | | - "output_type": "stream", |
106 | | - "text": [ |
107 | | - "INFO:src.videos:Transcribing video with speaker diarization: ../data/video/regular_council_meeting___2025_02_26_clip_4-50_to_5-20.mp4\n", |
108 | | - "INFO:src.videos:Output will be saved to: ../data/transcripts/regular_council_meeting___2025_02_26_clip_4-50_to_5-20.diarized.json\n", |
109 | | - "INFO:src.huggingface:Auto-detected device: cpu\n", |
110 | | - "INFO:src.huggingface:Auto-selected compute_type: int8\n", |
111 | | - "INFO:src.huggingface:Loading WhisperX model: tiny on cpu with int8 precision\n" |
112 | | - ] |
113 | | - }, |
114 | | - { |
115 | | - "data": { |
116 | | - "application/vnd.jupyter.widget-view+json": { |
117 | | - "model_id": "168afa65d3ae4108af591eb1993fe482", |
118 | | - "version_major": 2, |
119 | | - "version_minor": 0 |
120 | | - }, |
121 | | - "text/plain": [ |
122 | | - "tokenizer.json: 0%| | 0.00/2.20M [00:00<?, ?B/s]" |
123 | | - ] |
124 | | - }, |
125 | | - "metadata": {}, |
126 | | - "output_type": "display_data" |
127 | | - }, |
128 | | - { |
129 | | - "data": { |
130 | | - "application/vnd.jupyter.widget-view+json": { |
131 | | - "model_id": "89d35faecb8e447db3ccb95407e2a775", |
132 | | - "version_major": 2, |
133 | | - "version_minor": 0 |
134 | | - }, |
135 | | - "text/plain": [ |
136 | | - "config.json: 0%| | 0.00/2.25k [00:00<?, ?B/s]" |
137 | | - ] |
138 | | - }, |
139 | | - "metadata": {}, |
140 | | - "output_type": "display_data" |
141 | | - }, |
142 | | - { |
143 | | - "data": { |
144 | | - "application/vnd.jupyter.widget-view+json": { |
145 | | - "model_id": "f616039556ee46aaaee2f975f016aeb0", |
146 | | - "version_major": 2, |
147 | | - "version_minor": 0 |
148 | | - }, |
149 | | - "text/plain": [ |
150 | | - "vocabulary.txt: 0%| | 0.00/460k [00:00<?, ?B/s]" |
151 | | - ] |
152 | | - }, |
153 | | - "metadata": {}, |
154 | | - "output_type": "display_data" |
155 | | - }, |
156 | | - { |
157 | | - "data": { |
158 | | - "application/vnd.jupyter.widget-view+json": { |
159 | | - "model_id": "50bd4e88d6084638b91847587cc9ed0a", |
160 | | - "version_major": 2, |
161 | | - "version_minor": 0 |
162 | | - }, |
163 | | - "text/plain": [ |
164 | | - "model.bin: 0%| | 0.00/75.5M [00:00<?, ?B/s]" |
165 | | - ] |
166 | | - }, |
167 | | - "metadata": {}, |
168 | | - "output_type": "display_data" |
169 | | - }, |
170 | | - { |
171 | | - "name": "stderr", |
172 | | - "output_type": "stream", |
173 | | - "text": [ |
174 | | - "Lightning automatically upgraded your loaded checkpoint from v1.5.4 to v2.5.0.post0. To apply the upgrade to your files permanently, run `python -m pytorch_lightning.utilities.upgrade_checkpoint ../../../../Library/Caches/pypoetry/virtualenvs/tgov_scraper-zRR99ne3-py3.11/lib/python3.11/site-packages/whisperx/assets/pytorch_model.bin`\n", |
175 | | - "INFO:src.huggingface:Loading diarization pipeline\n" |
176 | | - ] |
177 | | - }, |
178 | | - { |
179 | | - "name": "stdout", |
180 | | - "output_type": "stream", |
181 | | - "text": [ |
182 | | - "No language specified, language will be first be detected for each audio file (increases inference time).\n", |
183 | | - ">>Performing voice activity detection using Pyannote...\n", |
184 | | - "Model was trained with pyannote.audio 0.0.1, yours is 3.3.2. Bad things might happen unless you revert pyannote.audio to 0.x.\n", |
185 | | - "Model was trained with torch 1.10.0+cu102, yours is 2.4.1. Bad things might happen unless you revert torch to 1.x.\n" |
186 | | - ] |
187 | | - }, |
188 | | - { |
189 | | - "name": "stderr", |
190 | | - "output_type": "stream", |
191 | | - "text": [ |
192 | | - "INFO:src.huggingface:WhisperX model loaded in 4.50 seconds\n", |
193 | | - "INFO:src.videos:Running initial transcription with batch size 8...\n" |
194 | | - ] |
195 | | - }, |
196 | | - { |
197 | | - "name": "stdout", |
198 | | - "output_type": "stream", |
199 | | - "text": [ |
200 | | - "Detected language: en (0.99) in first 30s of audio...\n" |
201 | | - ] |
202 | | - }, |
203 | | - { |
204 | | - "name": "stderr", |
205 | | - "output_type": "stream", |
206 | | - "text": [ |
207 | | - "INFO:src.videos:Detected language: en\n", |
208 | | - "INFO:src.videos:Loading alignment model for detected language: en\n", |
209 | | - "INFO:src.videos:Aligning transcription with audio...\n", |
210 | | - "INFO:src.videos:Running speaker diarization...\n", |
211 | | - "/Users/owner/Library/Caches/pypoetry/virtualenvs/tgov_scraper-zRR99ne3-py3.11/lib/python3.11/site-packages/pyannote/audio/models/blocks/pooling.py:104: UserWarning: std(): degrees of freedom is <= 0. Correction should be strictly less than the reduction factor (input numel divided by output numel). (Triggered internally at /Users/runner/work/pytorch/pytorch/pytorch/aten/src/ATen/native/ReduceOps.cpp:1808.)\n", |
212 | | - " std = sequences.std(dim=-1, correction=1)\n", |
213 | | - "INFO:src.videos:Assigning speakers to transcription...\n", |
214 | | - "INFO:src.videos:Processing transcription segments...\n", |
215 | | - "INFO:src.videos:Diarized transcription completed in 30.03 seconds\n", |
216 | | - "INFO:src.videos:Detailed JSON saved to: ../data/transcripts/regular_council_meeting___2025_02_26_clip_4-50_to_5-20.diarized.json\n" |
217 | | - ] |
218 | | - } |
219 | | - ], |
| 94 | + "outputs": [], |
220 | 95 | "source": [ |
221 | 96 | "from src.videos import transcribe_video_with_diarization\n", |
222 | 97 | "\n", |
|
231 | 106 | }, |
232 | 107 | { |
233 | 108 | "cell_type": "code", |
234 | | - "execution_count": 8, |
| 109 | + "execution_count": null, |
235 | 110 | "metadata": {}, |
236 | | - "outputs": [ |
237 | | - { |
238 | | - "data": { |
239 | | - "application/vnd.jupyter.widget-view+json": { |
240 | | - "model_id": "5d97ff70c1c3409da83c10c478f2bfaa", |
241 | | - "version_major": 2, |
242 | | - "version_minor": 0 |
243 | | - }, |
244 | | - "text/plain": [ |
245 | | - "HTML(value='<h3>Meeting Script</h3><hr><p><b>[00:00:00] SPEAKER_01:</b><br>Thank you, Mr. Huffinds. Any counci…" |
246 | | - ] |
247 | | - }, |
248 | | - "metadata": {}, |
249 | | - "output_type": "display_data" |
250 | | - } |
251 | | - ], |
| 111 | + "outputs": [], |
252 | 112 | "source": [ |
253 | 113 | "def format_timestamp(seconds: float) -> str:\n", |
254 | 114 | " \"\"\"Convert seconds to HH:MM:SS format\"\"\"\n", |
|
0 commit comments