lighteternal commited on
Commit
a9d1c20
1 Parent(s): 8aa27c7

Added new model trained on 60 epochs

Browse files
.ipynb_checkpoints/ASR_Inference-checkpoint.ipynb CHANGED
@@ -2,23 +2,14 @@
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
- "execution_count": 1,
6
  "metadata": {
7
  "ExecuteTime": {
8
- "end_time": "2021-03-14T09:33:41.892030Z",
9
- "start_time": "2021-03-14T09:33:40.729163Z"
10
  }
11
  },
12
- "outputs": [
13
- {
14
- "name": "stderr",
15
- "output_type": "stream",
16
- "text": [
17
- "/home/earendil/anaconda3/envs/cuda110/lib/python3.8/site-packages/torchaudio/backend/utils.py:53: UserWarning: \"sox\" backend is being deprecated. The default backend will be changed to \"sox_io\" backend in 0.8.0 and \"sox\" backend will be removed in 0.9.0. Please migrate to \"sox_io\" backend. Please refer to https://github.com/pytorch/audio/issues/903 for the detail.\n",
18
- " warnings.warn(\n"
19
- ]
20
- }
21
- ],
22
  "source": [
23
  "from transformers import Wav2Vec2ForCTC\n",
24
  "from transformers import Wav2Vec2Processor\n",
@@ -33,11 +24,11 @@
33
  },
34
  {
35
  "cell_type": "code",
36
- "execution_count": 2,
37
  "metadata": {
38
  "ExecuteTime": {
39
- "end_time": "2021-03-14T09:33:41.909851Z",
40
- "start_time": "2021-03-14T09:33:41.906327Z"
41
  }
42
  },
43
  "outputs": [],
@@ -75,11 +66,11 @@
75
  },
76
  {
77
  "cell_type": "code",
78
- "execution_count": 3,
79
  "metadata": {
80
  "ExecuteTime": {
81
- "end_time": "2021-03-14T09:33:49.053762Z",
82
- "start_time": "2021-03-14T09:33:41.922683Z"
83
  }
84
  },
85
  "outputs": [
@@ -92,17 +83,17 @@
92
  }
93
  ],
94
  "source": [
95
- "model = Wav2Vec2ForCTC.from_pretrained(\"wav2vec2-large-xlsr-greek/checkpoint-9200/\").to(\"cuda\")\n",
96
  "processor = Wav2Vec2Processor.from_pretrained(\"wav2vec2-large-xlsr-greek/\")"
97
  ]
98
  },
99
  {
100
  "cell_type": "code",
101
- "execution_count": 4,
102
  "metadata": {
103
  "ExecuteTime": {
104
- "end_time": "2021-03-14T09:33:52.413558Z",
105
- "start_time": "2021-03-14T09:33:49.078466Z"
106
  }
107
  },
108
  "outputs": [
@@ -121,11 +112,11 @@
121
  },
122
  {
123
  "cell_type": "code",
124
- "execution_count": 5,
125
  "metadata": {
126
  "ExecuteTime": {
127
- "end_time": "2021-03-14T09:33:52.444418Z",
128
- "start_time": "2021-03-14T09:33:52.441338Z"
129
  }
130
  },
131
  "outputs": [],
@@ -135,11 +126,11 @@
135
  },
136
  {
137
  "cell_type": "code",
138
- "execution_count": 6,
139
  "metadata": {
140
  "ExecuteTime": {
141
- "end_time": "2021-03-14T09:33:52.473087Z",
142
- "start_time": "2021-03-14T09:33:52.468014Z"
143
  }
144
  },
145
  "outputs": [
@@ -157,11 +148,11 @@
157
  },
158
  {
159
  "cell_type": "code",
160
- "execution_count": 7,
161
  "metadata": {
162
  "ExecuteTime": {
163
- "end_time": "2021-03-14T09:33:52.510377Z",
164
- "start_time": "2021-03-14T09:33:52.501677Z"
165
  }
166
  },
167
  "outputs": [
@@ -179,11 +170,11 @@
179
  },
180
  {
181
  "cell_type": "code",
182
- "execution_count": 8,
183
  "metadata": {
184
  "ExecuteTime": {
185
- "end_time": "2021-03-14T09:33:53.321810Z",
186
- "start_time": "2021-03-14T09:33:52.533233Z"
187
  }
188
  },
189
  "outputs": [
@@ -191,30 +182,28 @@
191
  "name": "stdout",
192
  "output_type": "stream",
193
  "text": [
194
- " "
195
  ]
196
  },
197
  {
198
  "name": "stderr",
199
  "output_type": "stream",
200
  "text": [
201
- "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-ba8c6dd59eb8ccf2.arrow\n",
202
- "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-2e240883a5f827fd.arrow\n"
203
  ]
204
  },
205
  {
206
  "name": "stdout",
207
  "output_type": "stream",
208
  "text": [
209
- " "
210
  ]
211
  },
212
  {
213
  "name": "stderr",
214
  "output_type": "stream",
215
  "text": [
216
- "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-485c00dc9048ed50.arrow\n",
217
- "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-44bf1791baae8e2e.arrow\n"
218
  ]
219
  },
220
  {
@@ -228,35 +217,37 @@
228
  "name": "stderr",
229
  "output_type": "stream",
230
  "text": [
231
- "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-ecc0dfac5615a58e.arrow\n"
232
  ]
233
  },
234
  {
235
  "name": "stdout",
236
  "output_type": "stream",
237
  "text": [
238
- " "
239
  ]
240
  },
241
  {
242
  "name": "stderr",
243
  "output_type": "stream",
244
  "text": [
245
- "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-923d905502a8661d.arrow\n"
 
246
  ]
247
  },
248
  {
249
  "name": "stdout",
250
  "output_type": "stream",
251
  "text": [
252
- " "
253
  ]
254
  },
255
  {
256
  "name": "stderr",
257
  "output_type": "stream",
258
  "text": [
259
- "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-062aeafc3b8816c1.arrow\n"
 
260
  ]
261
  },
262
  {
@@ -270,7 +261,7 @@
270
  "name": "stderr",
271
  "output_type": "stream",
272
  "text": [
273
- "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-bb54bb00dae79669.arrow\n"
274
  ]
275
  }
276
  ],
@@ -280,62 +271,27 @@
280
  },
281
  {
282
  "cell_type": "code",
283
- "execution_count": 9,
284
  "metadata": {
285
  "ExecuteTime": {
286
- "end_time": "2021-03-14T09:33:53.611415Z",
287
- "start_time": "2021-03-14T09:33:53.342487Z"
288
  }
289
  },
290
  "outputs": [
291
- {
292
- "name": "stderr",
293
- "output_type": "stream",
294
- "text": [
295
- "/home/earendil/anaconda3/envs/cuda110/lib/python3.8/site-packages/numpy/core/_asarray.py:83: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n",
296
- " return array(a, dtype, copy=False, order=order)\n"
297
- ]
298
- },
299
  {
300
  "name": "stdout",
301
  "output_type": "stream",
302
  "text": [
303
- " "
304
- ]
305
- },
306
- {
307
- "name": "stderr",
308
- "output_type": "stream",
309
- "text": [
310
- "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-6dfad29ca815f865.arrow\n"
311
- ]
312
- },
313
- {
314
- "name": "stdout",
315
- "output_type": "stream",
316
- "text": [
317
- " "
318
- ]
319
- },
320
- {
321
- "name": "stderr",
322
- "output_type": "stream",
323
- "text": [
324
- "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-61e9ae0296df46f8.arrow\n"
325
- ]
326
- },
327
- {
328
- "name": "stdout",
329
- "output_type": "stream",
330
- "text": [
331
- " "
332
  ]
333
  },
334
  {
335
  "name": "stderr",
336
  "output_type": "stream",
337
  "text": [
338
- "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-7f5aae16804e0788.arrow\n"
 
339
  ]
340
  },
341
  {
@@ -349,7 +305,7 @@
349
  "name": "stderr",
350
  "output_type": "stream",
351
  "text": [
352
- "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-b9636a5d30ffb973.arrow\n"
353
  ]
354
  },
355
  {
@@ -363,7 +319,7 @@
363
  "name": "stderr",
364
  "output_type": "stream",
365
  "text": [
366
- "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-7e60f2d73a65610a.arrow\n"
367
  ]
368
  },
369
  {
@@ -377,21 +333,22 @@
377
  "name": "stderr",
378
  "output_type": "stream",
379
  "text": [
380
- "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-3c99781789816a60.arrow\n"
381
  ]
382
  },
383
  {
384
  "name": "stdout",
385
  "output_type": "stream",
386
  "text": [
387
- " "
388
  ]
389
  },
390
  {
391
  "name": "stderr",
392
  "output_type": "stream",
393
  "text": [
394
- "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-bae077f32f9eb290.arrow\n"
 
395
  ]
396
  },
397
  {
@@ -405,7 +362,7 @@
405
  "name": "stderr",
406
  "output_type": "stream",
407
  "text": [
408
- "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-4fb6951626f7548e.arrow\n"
409
  ]
410
  }
411
  ],
@@ -415,11 +372,11 @@
415
  },
416
  {
417
  "cell_type": "code",
418
- "execution_count": 10,
419
  "metadata": {
420
  "ExecuteTime": {
421
- "end_time": "2021-03-14T09:33:56.243678Z",
422
- "start_time": "2021-03-14T09:33:53.632436Z"
423
  }
424
  },
425
  "outputs": [
@@ -438,17 +395,17 @@
438
  },
439
  {
440
  "cell_type": "code",
441
- "execution_count": 19,
442
  "metadata": {
443
  "ExecuteTime": {
444
- "end_time": "2021-03-14T09:36:50.076837Z",
445
- "start_time": "2021-03-14T09:36:24.943947Z"
446
  }
447
  },
448
  "outputs": [],
449
  "source": [
450
  "# Change this value to try inference on different CommonVoice extracts\n",
451
- "example = 123\n",
452
  "\n",
453
  "input_dict = processor(common_voice_test[\"input_values\"][example], return_tensors=\"pt\", sampling_rate=16_000, padding=True)\n",
454
  "\n",
@@ -459,11 +416,11 @@
459
  },
460
  {
461
  "cell_type": "code",
462
- "execution_count": 20,
463
  "metadata": {
464
  "ExecuteTime": {
465
- "end_time": "2021-03-14T09:36:50.137886Z",
466
- "start_time": "2021-03-14T09:36:50.134218Z"
467
  }
468
  },
469
  "outputs": [
@@ -472,29 +429,22 @@
472
  "output_type": "stream",
473
  "text": [
474
  "Prediction:\n",
475
- "καμιά φορά τα έπαιρνε και έπαιζε όταν η δουλειά ήταν πιο χαλαρί\n",
476
  "\n",
477
  "Reference:\n",
478
- "καμιά φορά τα έπαιρνε και έπαιζε όταν η δουλειά ήταν πιο χαλαρή\n"
479
  ]
480
  }
481
  ],
482
  "source": [
483
  "print(\"Prediction:\")\n",
484
  "print(processor.decode(pred_ids[0]))\n",
485
- "# καμιά φορά τα έπαιρνε και έπαιζε όταν η δουλειά ήταν πιο χαλαρί\n",
486
  "\n",
487
  "print(\"\\nReference:\")\n",
488
  "print(common_voice_test_transcription[\"sentence\"][example].lower())\n",
489
- "# καμιά φορά τα έπαιρνε και έπαιζε όταν η δουλειά ήταν πιο χαλαρή"
490
  ]
491
- },
492
- {
493
- "cell_type": "code",
494
- "execution_count": null,
495
- "metadata": {},
496
- "outputs": [],
497
- "source": []
498
  }
499
  ],
500
  "metadata": {
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
+ "execution_count": 15,
6
  "metadata": {
7
  "ExecuteTime": {
8
+ "end_time": "2021-03-14T18:07:15.328900Z",
9
+ "start_time": "2021-03-14T18:07:15.326838Z"
10
  }
11
  },
12
+ "outputs": [],
 
 
 
 
 
 
 
 
 
13
  "source": [
14
  "from transformers import Wav2Vec2ForCTC\n",
15
  "from transformers import Wav2Vec2Processor\n",
24
  },
25
  {
26
  "cell_type": "code",
27
+ "execution_count": 16,
28
  "metadata": {
29
  "ExecuteTime": {
30
+ "end_time": "2021-03-14T18:07:15.933957Z",
31
+ "start_time": "2021-03-14T18:07:15.927789Z"
32
  }
33
  },
34
  "outputs": [],
66
  },
67
  {
68
  "cell_type": "code",
69
+ "execution_count": 17,
70
  "metadata": {
71
  "ExecuteTime": {
72
+ "end_time": "2021-03-14T18:07:22.624226Z",
73
+ "start_time": "2021-03-14T18:07:16.402381Z"
74
  }
75
  },
76
  "outputs": [
83
  }
84
  ],
85
  "source": [
86
+ "model = Wav2Vec2ForCTC.from_pretrained(\"wav2vec2-large-xlsr-greek/checkpoint-18400/\").to(\"cuda\")\n",
87
  "processor = Wav2Vec2Processor.from_pretrained(\"wav2vec2-large-xlsr-greek/\")"
88
  ]
89
  },
90
  {
91
  "cell_type": "code",
92
+ "execution_count": 18,
93
  "metadata": {
94
  "ExecuteTime": {
95
+ "end_time": "2021-03-14T18:07:25.473609Z",
96
+ "start_time": "2021-03-14T18:07:22.644765Z"
97
  }
98
  },
99
  "outputs": [
112
  },
113
  {
114
  "cell_type": "code",
115
+ "execution_count": 19,
116
  "metadata": {
117
  "ExecuteTime": {
118
+ "end_time": "2021-03-14T18:07:25.504511Z",
119
+ "start_time": "2021-03-14T18:07:25.500688Z"
120
  }
121
  },
122
  "outputs": [],
126
  },
127
  {
128
  "cell_type": "code",
129
+ "execution_count": 20,
130
  "metadata": {
131
  "ExecuteTime": {
132
+ "end_time": "2021-03-14T18:07:25.540666Z",
133
+ "start_time": "2021-03-14T18:07:25.536214Z"
134
  }
135
  },
136
  "outputs": [
148
  },
149
  {
150
  "cell_type": "code",
151
+ "execution_count": 21,
152
  "metadata": {
153
  "ExecuteTime": {
154
+ "end_time": "2021-03-14T18:07:25.578015Z",
155
+ "start_time": "2021-03-14T18:07:25.568808Z"
156
  }
157
  },
158
  "outputs": [
170
  },
171
  {
172
  "cell_type": "code",
173
+ "execution_count": 22,
174
  "metadata": {
175
  "ExecuteTime": {
176
+ "end_time": "2021-03-14T18:07:26.404914Z",
177
+ "start_time": "2021-03-14T18:07:25.605177Z"
178
  }
179
  },
180
  "outputs": [
182
  "name": "stdout",
183
  "output_type": "stream",
184
  "text": [
185
+ " "
186
  ]
187
  },
188
  {
189
  "name": "stderr",
190
  "output_type": "stream",
191
  "text": [
192
+ "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-ba8c6dd59eb8ccf2.arrow\n"
 
193
  ]
194
  },
195
  {
196
  "name": "stdout",
197
  "output_type": "stream",
198
  "text": [
199
+ " "
200
  ]
201
  },
202
  {
203
  "name": "stderr",
204
  "output_type": "stream",
205
  "text": [
206
+ "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-2e240883a5f827fd.arrow\n"
 
207
  ]
208
  },
209
  {
217
  "name": "stderr",
218
  "output_type": "stream",
219
  "text": [
220
+ "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-485c00dc9048ed50.arrow\n"
221
  ]
222
  },
223
  {
224
  "name": "stdout",
225
  "output_type": "stream",
226
  "text": [
227
+ " "
228
  ]
229
  },
230
  {
231
  "name": "stderr",
232
  "output_type": "stream",
233
  "text": [
234
+ "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-44bf1791baae8e2e.arrow\n",
235
+ "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-ecc0dfac5615a58e.arrow\n"
236
  ]
237
  },
238
  {
239
  "name": "stdout",
240
  "output_type": "stream",
241
  "text": [
242
+ " "
243
  ]
244
  },
245
  {
246
  "name": "stderr",
247
  "output_type": "stream",
248
  "text": [
249
+ "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-bb54bb00dae79669.arrow\n",
250
+ "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-923d905502a8661d.arrow\n"
251
  ]
252
  },
253
  {
261
  "name": "stderr",
262
  "output_type": "stream",
263
  "text": [
264
+ "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-062aeafc3b8816c1.arrow\n"
265
  ]
266
  }
267
  ],
271
  },
272
  {
273
  "cell_type": "code",
274
+ "execution_count": 23,
275
  "metadata": {
276
  "ExecuteTime": {
277
+ "end_time": "2021-03-14T18:07:27.032511Z",
278
+ "start_time": "2021-03-14T18:07:26.432613Z"
279
  }
280
  },
281
  "outputs": [
 
 
 
 
 
 
 
 
282
  {
283
  "name": "stdout",
284
  "output_type": "stream",
285
  "text": [
286
+ " "
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
287
  ]
288
  },
289
  {
290
  "name": "stderr",
291
  "output_type": "stream",
292
  "text": [
293
+ "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-82be72eab73488a6.arrow\n",
294
+ "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-a30edec53656694c.arrow\n"
295
  ]
296
  },
297
  {
305
  "name": "stderr",
306
  "output_type": "stream",
307
  "text": [
308
+ "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-91aacc366ff3e776.arrow\n"
309
  ]
310
  },
311
  {
319
  "name": "stderr",
320
  "output_type": "stream",
321
  "text": [
322
+ "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-cce8223f5c38f863.arrow\n"
323
  ]
324
  },
325
  {
333
  "name": "stderr",
334
  "output_type": "stream",
335
  "text": [
336
+ "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-4f0d5b132b7516de.arrow\n"
337
  ]
338
  },
339
  {
340
  "name": "stdout",
341
  "output_type": "stream",
342
  "text": [
343
+ " "
344
  ]
345
  },
346
  {
347
  "name": "stderr",
348
  "output_type": "stream",
349
  "text": [
350
+ "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-55caed3924d51e22.arrow\n",
351
+ "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-2cc086daed2595be.arrow\n"
352
  ]
353
  },
354
  {
362
  "name": "stderr",
363
  "output_type": "stream",
364
  "text": [
365
+ "Loading cached processed dataset at /home/earendil/.cache/huggingface/datasets/common_voice/el-afd0a157f05ee080/6.1.0/32954a9015faa0d840f6c6894938545c5d12bc5d8936a80079af74bf50d71564/cache-118401c99df7b83c.arrow\n"
366
  ]
367
  }
368
  ],
372
  },
373
  {
374
  "cell_type": "code",
375
+ "execution_count": 24,
376
  "metadata": {
377
  "ExecuteTime": {
378
+ "end_time": "2021-03-14T18:07:29.428864Z",
379
+ "start_time": "2021-03-14T18:07:27.056686Z"
380
  }
381
  },
382
  "outputs": [
395
  },
396
  {
397
  "cell_type": "code",
398
+ "execution_count": 25,
399
  "metadata": {
400
  "ExecuteTime": {
401
+ "end_time": "2021-03-14T18:07:54.722520Z",
402
+ "start_time": "2021-03-14T18:07:29.451275Z"
403
  }
404
  },
405
  "outputs": [],
406
  "source": [
407
  "# Change this value to try inference on different CommonVoice extracts\n",
408
+ "example = 678\n",
409
  "\n",
410
  "input_dict = processor(common_voice_test[\"input_values\"][example], return_tensors=\"pt\", sampling_rate=16_000, padding=True)\n",
411
  "\n",
416
  },
417
  {
418
  "cell_type": "code",
419
+ "execution_count": 26,
420
  "metadata": {
421
  "ExecuteTime": {
422
+ "end_time": "2021-03-14T18:07:54.742988Z",
423
+ "start_time": "2021-03-14T18:07:54.739626Z"
424
  }
425
  },
426
  "outputs": [
429
  "output_type": "stream",
430
  "text": [
431
  "Prediction:\n",
432
+ "πού θέλεις να πάμε ρώτησε φοβισμένα ο βασιλιάς\n",
433
  "\n",
434
  "Reference:\n",
435
+ "πού θέλεις να πάμε; ρώτησε φοβισμένα ο βασιλιάς.\n"
436
  ]
437
  }
438
  ],
439
  "source": [
440
  "print(\"Prediction:\")\n",
441
  "print(processor.decode(pred_ids[0]))\n",
442
+ "# πού θέλεις να πάμε ρώτησε φοβισμένα ο βασιλιάς\n",
443
  "\n",
444
  "print(\"\\nReference:\")\n",
445
  "print(common_voice_test_transcription[\"sentence\"][example].lower())\n",
446
+ "# πού θέλεις να πάμε; ρώτησε φοβισμένα ο βασιλιάς."
447
  ]
 
 
 
 
 
 
 
448
  }
449
  ],
450
  "metadata": {
.ipynb_checkpoints/Fine_Tune_XLSR_Wav2Vec2_on_Greek_ASR_with_🤗_Transformers-checkpoint.ipynb ADDED
The diff for this file is too large to render. See raw diff