Simonlob commited on
Commit
ef9e9b8
·
verified ·
1 Parent(s): 5add91c

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +463 -517
README.md CHANGED
@@ -1,519 +1,465 @@
1
  ---
2
- dataset_info:
3
- features:
4
- - name: mfcc0_mean
5
- dtype: float32
6
- - name: mfcc1_mean
7
- dtype: float32
8
- - name: mfcc2_mean
9
- dtype: float32
10
- - name: mfcc3_mean
11
- dtype: float32
12
- - name: mfcc4_mean
13
- dtype: float32
14
- - name: mfcc5_mean
15
- dtype: float32
16
- - name: mfcc6_mean
17
- dtype: float32
18
- - name: mfcc7_mean
19
- dtype: float32
20
- - name: mfcc8_mean
21
- dtype: float32
22
- - name: mfcc9_mean
23
- dtype: float32
24
- - name: mfcc10_mean
25
- dtype: float32
26
- - name: mfcc11_mean
27
- dtype: float32
28
- - name: mfcc12_mean
29
- dtype: float32
30
- - name: mfcc13_mean
31
- dtype: float32
32
- - name: mfcc14_mean
33
- dtype: float32
34
- - name: mfcc15_mean
35
- dtype: float32
36
- - name: mfcc16_mean
37
- dtype: float32
38
- - name: mfcc17_mean
39
- dtype: float32
40
- - name: mfcc18_mean
41
- dtype: float32
42
- - name: mfcc19_mean
43
- dtype: float32
44
- - name: mfcc0_std
45
- dtype: float32
46
- - name: mfcc1_std
47
- dtype: float32
48
- - name: mfcc2_std
49
- dtype: float32
50
- - name: mfcc3_std
51
- dtype: float32
52
- - name: mfcc4_std
53
- dtype: float32
54
- - name: mfcc5_std
55
- dtype: float32
56
- - name: mfcc6_std
57
- dtype: float32
58
- - name: mfcc7_std
59
- dtype: float32
60
- - name: mfcc8_std
61
- dtype: float32
62
- - name: mfcc9_std
63
- dtype: float32
64
- - name: mfcc10_std
65
- dtype: float32
66
- - name: mfcc11_std
67
- dtype: float32
68
- - name: mfcc12_std
69
- dtype: float32
70
- - name: mfcc13_std
71
- dtype: float32
72
- - name: mfcc14_std
73
- dtype: float32
74
- - name: mfcc15_std
75
- dtype: float32
76
- - name: mfcc16_std
77
- dtype: float32
78
- - name: mfcc17_std
79
- dtype: float32
80
- - name: mfcc18_std
81
- dtype: float32
82
- - name: mfcc19_std
83
- dtype: float32
84
- - name: d1_0_mean
85
- dtype: float32
86
- - name: d1_1_mean
87
- dtype: float32
88
- - name: d1_2_mean
89
- dtype: float32
90
- - name: d1_3_mean
91
- dtype: float32
92
- - name: d1_4_mean
93
- dtype: float32
94
- - name: d1_5_mean
95
- dtype: float32
96
- - name: d1_6_mean
97
- dtype: float32
98
- - name: d1_7_mean
99
- dtype: float32
100
- - name: d1_8_mean
101
- dtype: float32
102
- - name: d1_9_mean
103
- dtype: float32
104
- - name: d1_10_mean
105
- dtype: float32
106
- - name: d1_11_mean
107
- dtype: float32
108
- - name: d1_12_mean
109
- dtype: float32
110
- - name: d1_13_mean
111
- dtype: float32
112
- - name: d1_14_mean
113
- dtype: float32
114
- - name: d1_15_mean
115
- dtype: float32
116
- - name: d1_16_mean
117
- dtype: float32
118
- - name: d1_17_mean
119
- dtype: float32
120
- - name: d1_18_mean
121
- dtype: float32
122
- - name: d1_19_mean
123
- dtype: float32
124
- - name: d1_0_std
125
- dtype: float32
126
- - name: d1_1_std
127
- dtype: float32
128
- - name: d1_2_std
129
- dtype: float32
130
- - name: d1_3_std
131
- dtype: float32
132
- - name: d1_4_std
133
- dtype: float32
134
- - name: d1_5_std
135
- dtype: float32
136
- - name: d1_6_std
137
- dtype: float32
138
- - name: d1_7_std
139
- dtype: float32
140
- - name: d1_8_std
141
- dtype: float32
142
- - name: d1_9_std
143
- dtype: float32
144
- - name: d1_10_std
145
- dtype: float32
146
- - name: d1_11_std
147
- dtype: float32
148
- - name: d1_12_std
149
- dtype: float32
150
- - name: d1_13_std
151
- dtype: float32
152
- - name: d1_14_std
153
- dtype: float32
154
- - name: d1_15_std
155
- dtype: float32
156
- - name: d1_16_std
157
- dtype: float32
158
- - name: d1_17_std
159
- dtype: float32
160
- - name: d1_18_std
161
- dtype: float32
162
- - name: d1_19_std
163
- dtype: float32
164
- - name: d2_0_mean
165
- dtype: float32
166
- - name: d2_1_mean
167
- dtype: float32
168
- - name: d2_2_mean
169
- dtype: float32
170
- - name: d2_3_mean
171
- dtype: float32
172
- - name: d2_4_mean
173
- dtype: float32
174
- - name: d2_5_mean
175
- dtype: float32
176
- - name: d2_6_mean
177
- dtype: float32
178
- - name: d2_7_mean
179
- dtype: float32
180
- - name: d2_8_mean
181
- dtype: float32
182
- - name: d2_9_mean
183
- dtype: float32
184
- - name: d2_10_mean
185
- dtype: float32
186
- - name: d2_11_mean
187
- dtype: float32
188
- - name: d2_12_mean
189
- dtype: float32
190
- - name: d2_13_mean
191
- dtype: float32
192
- - name: d2_14_mean
193
- dtype: float32
194
- - name: d2_15_mean
195
- dtype: float32
196
- - name: d2_16_mean
197
- dtype: float32
198
- - name: d2_17_mean
199
- dtype: float32
200
- - name: d2_18_mean
201
- dtype: float32
202
- - name: d2_19_mean
203
- dtype: float32
204
- - name: d2_0_std
205
- dtype: float32
206
- - name: d2_1_std
207
- dtype: float32
208
- - name: d2_2_std
209
- dtype: float32
210
- - name: d2_3_std
211
- dtype: float32
212
- - name: d2_4_std
213
- dtype: float32
214
- - name: d2_5_std
215
- dtype: float32
216
- - name: d2_6_std
217
- dtype: float32
218
- - name: d2_7_std
219
- dtype: float32
220
- - name: d2_8_std
221
- dtype: float32
222
- - name: d2_9_std
223
- dtype: float32
224
- - name: d2_10_std
225
- dtype: float32
226
- - name: d2_11_std
227
- dtype: float32
228
- - name: d2_12_std
229
- dtype: float32
230
- - name: d2_13_std
231
- dtype: float32
232
- - name: d2_14_std
233
- dtype: float32
234
- - name: d2_15_std
235
- dtype: float32
236
- - name: d2_16_std
237
- dtype: float32
238
- - name: d2_17_std
239
- dtype: float32
240
- - name: d2_18_std
241
- dtype: float32
242
- - name: d2_19_std
243
- dtype: float32
244
- - name: mel0_mean
245
- dtype: float32
246
- - name: mel1_mean
247
- dtype: float32
248
- - name: mel2_mean
249
- dtype: float32
250
- - name: mel3_mean
251
- dtype: float32
252
- - name: mel4_mean
253
- dtype: float32
254
- - name: mel5_mean
255
- dtype: float32
256
- - name: mel6_mean
257
- dtype: float32
258
- - name: mel7_mean
259
- dtype: float32
260
- - name: mel8_mean
261
- dtype: float32
262
- - name: mel9_mean
263
- dtype: float32
264
- - name: mel10_mean
265
- dtype: float32
266
- - name: mel11_mean
267
- dtype: float32
268
- - name: mel12_mean
269
- dtype: float32
270
- - name: mel13_mean
271
- dtype: float32
272
- - name: mel14_mean
273
- dtype: float32
274
- - name: mel15_mean
275
- dtype: float32
276
- - name: mel16_mean
277
- dtype: float32
278
- - name: mel17_mean
279
- dtype: float32
280
- - name: mel18_mean
281
- dtype: float32
282
- - name: mel19_mean
283
- dtype: float32
284
- - name: mel20_mean
285
- dtype: float32
286
- - name: mel21_mean
287
- dtype: float32
288
- - name: mel22_mean
289
- dtype: float32
290
- - name: mel23_mean
291
- dtype: float32
292
- - name: mel24_mean
293
- dtype: float32
294
- - name: mel25_mean
295
- dtype: float32
296
- - name: mel26_mean
297
- dtype: float32
298
- - name: mel27_mean
299
- dtype: float32
300
- - name: mel28_mean
301
- dtype: float32
302
- - name: mel29_mean
303
- dtype: float32
304
- - name: mel30_mean
305
- dtype: float32
306
- - name: mel31_mean
307
- dtype: float32
308
- - name: mel32_mean
309
- dtype: float32
310
- - name: mel33_mean
311
- dtype: float32
312
- - name: mel34_mean
313
- dtype: float32
314
- - name: mel35_mean
315
- dtype: float32
316
- - name: mel36_mean
317
- dtype: float32
318
- - name: mel37_mean
319
- dtype: float32
320
- - name: mel38_mean
321
- dtype: float32
322
- - name: mel39_mean
323
- dtype: float32
324
- - name: mel0_std
325
- dtype: float32
326
- - name: mel1_std
327
- dtype: float32
328
- - name: mel2_std
329
- dtype: float32
330
- - name: mel3_std
331
- dtype: float32
332
- - name: mel4_std
333
- dtype: float32
334
- - name: mel5_std
335
- dtype: float32
336
- - name: mel6_std
337
- dtype: float32
338
- - name: mel7_std
339
- dtype: float32
340
- - name: mel8_std
341
- dtype: float32
342
- - name: mel9_std
343
- dtype: float32
344
- - name: mel10_std
345
- dtype: float32
346
- - name: mel11_std
347
- dtype: float32
348
- - name: mel12_std
349
- dtype: float32
350
- - name: mel13_std
351
- dtype: float32
352
- - name: mel14_std
353
- dtype: float32
354
- - name: mel15_std
355
- dtype: float32
356
- - name: mel16_std
357
- dtype: float32
358
- - name: mel17_std
359
- dtype: float32
360
- - name: mel18_std
361
- dtype: float32
362
- - name: mel19_std
363
- dtype: float32
364
- - name: mel20_std
365
- dtype: float32
366
- - name: mel21_std
367
- dtype: float32
368
- - name: mel22_std
369
- dtype: float32
370
- - name: mel23_std
371
- dtype: float32
372
- - name: mel24_std
373
- dtype: float32
374
- - name: mel25_std
375
- dtype: float32
376
- - name: mel26_std
377
- dtype: float32
378
- - name: mel27_std
379
- dtype: float32
380
- - name: mel28_std
381
- dtype: float32
382
- - name: mel29_std
383
- dtype: float32
384
- - name: mel30_std
385
- dtype: float32
386
- - name: mel31_std
387
- dtype: float32
388
- - name: mel32_std
389
- dtype: float32
390
- - name: mel33_std
391
- dtype: float32
392
- - name: mel34_std
393
- dtype: float32
394
- - name: mel35_std
395
- dtype: float32
396
- - name: mel36_std
397
- dtype: float32
398
- - name: mel37_std
399
- dtype: float32
400
- - name: mel38_std
401
- dtype: float32
402
- - name: mel39_std
403
- dtype: float32
404
- - name: contrast0_mean
405
- dtype: float32
406
- - name: contrast1_mean
407
- dtype: float32
408
- - name: contrast2_mean
409
- dtype: float32
410
- - name: contrast3_mean
411
- dtype: float32
412
- - name: contrast4_mean
413
- dtype: float32
414
- - name: contrast5_mean
415
- dtype: float32
416
- - name: contrast6_mean
417
- dtype: float32
418
- - name: contrast0_std
419
- dtype: float32
420
- - name: contrast1_std
421
- dtype: float32
422
- - name: contrast2_std
423
- dtype: float32
424
- - name: contrast3_std
425
- dtype: float32
426
- - name: contrast4_std
427
- dtype: float32
428
- - name: contrast5_std
429
- dtype: float32
430
- - name: contrast6_std
431
- dtype: float32
432
- - name: chroma0_mean
433
- dtype: float32
434
- - name: chroma1_mean
435
- dtype: float32
436
- - name: chroma2_mean
437
- dtype: float32
438
- - name: chroma3_mean
439
- dtype: float32
440
- - name: chroma4_mean
441
- dtype: float32
442
- - name: chroma5_mean
443
- dtype: float32
444
- - name: chroma6_mean
445
- dtype: float32
446
- - name: chroma7_mean
447
- dtype: float32
448
- - name: chroma8_mean
449
- dtype: float32
450
- - name: chroma9_mean
451
- dtype: float32
452
- - name: chroma10_mean
453
- dtype: float32
454
- - name: chroma11_mean
455
- dtype: float32
456
- - name: chroma0_std
457
- dtype: float32
458
- - name: chroma1_std
459
- dtype: float32
460
- - name: chroma2_std
461
- dtype: float32
462
- - name: chroma3_std
463
- dtype: float32
464
- - name: chroma4_std
465
- dtype: float32
466
- - name: chroma5_std
467
- dtype: float32
468
- - name: chroma6_std
469
- dtype: float32
470
- - name: chroma7_std
471
- dtype: float32
472
- - name: chroma8_std
473
- dtype: float32
474
- - name: chroma9_std
475
- dtype: float32
476
- - name: chroma10_std
477
- dtype: float32
478
- - name: chroma11_std
479
- dtype: float32
480
- - name: centroid_mean
481
- dtype: float32
482
- - name: centroid_std
483
- dtype: float32
484
- - name: bandwidth_mean
485
- dtype: float32
486
- - name: bandwidth_std
487
- dtype: float32
488
- - name: rolloff_mean
489
- dtype: float32
490
- - name: rolloff_std
491
- dtype: float32
492
- - name: flatness_mean
493
- dtype: float32
494
- - name: flatness_std
495
- dtype: float32
496
- - name: zcr_mean
497
- dtype: float32
498
- - name: zcr_std
499
- dtype: float32
500
- - name: rms_mean
501
- dtype: float32
502
- - name: rms_std
503
- dtype: float32
504
- - name: label
505
- dtype: int64
506
- - name: source
507
- dtype: large_string
508
- splits:
509
- - name: train
510
- num_bytes: 40946527
511
- num_examples: 40000
512
- download_size: 59393466
513
- dataset_size: 40946527
514
- configs:
515
- - config_name: default
516
- data_files:
517
- - split: train
518
- path: data/train-*
519
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: apache-2.0
3
+ language:
4
+ - ky
5
+ - ru
6
+ task_categories:
7
+ - tabular-classification
8
+ - audio-classification
9
+ tags:
10
+ - keyword-spotting
11
+ - wake-word
12
+ - kyrgyz
13
+ - speech
14
+ - mfcc
15
+ - spectral-features
16
+ - educational
17
+ - teaching
18
+ size_categories:
19
+ - 10K<n<100K
20
+ pretty_name: "Akylai KWS Features — Educational Spectral-Feature Dataset"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  ---
22
+
23
+ # Akylai KWS Features — An Educational Spectral-Feature Dataset for Keyword Spotting
24
+
25
+ A ready-to-model, **tabular** dataset for teaching binary classification on a *real* speech
26
+ problem: detecting the Kyrgyz wake word **«Акылай»** (*Akylai*) versus everything else.
27
+ Each row is one short audio clip already converted into a **fixed-length vector of 250
28
+ spectral features**, so students can go straight to `scikit-learn` without touching a single
29
+ audio library — yet the problem is a genuine, non-toy **Keyword Spotting (KWS)** task with a
30
+ natural class imbalance, several distinct negative sub-populations, and instructive failure
31
+ modes.
32
+
33
+ > **One-line summary.** 40 000 clips → 250 acoustic features → binary label
34
+ > (`1` = wake word, `0` = not). Mildly imbalanced (1 : 3). Built for an ML course that has
35
+ > just covered linear models (Logistic Regression, SVM) and is about to meet trees.
36
+
37
+ ---
38
+
39
+ ## Table of contents
40
+
41
+ 1. [The task: what is Keyword Spotting?](#1-the-task-what-is-keyword-spotting)
42
+ 2. [A short history of wake words](#2-a-short-history-of-wake-words)
43
+ 3. [Where the audio comes from (provenance)](#3-where-the-audio-comes-from-provenance)
44
+ 4. [From a waveform to a feature vector](#4-from-a-waveform-to-a-feature-vector)
45
+ 5. [The features, in detail (with formulas)](#5-the-features-in-detail-with-formulas)
46
+ 6. [Temporal aggregation: variable-length audio → fixed vector](#6-temporal-aggregation-variable-length-audio--fixed-vector)
47
+ 7. [Dataset schema](#7-dataset-schema)
48
+ 8. [Modeling challenges (read this before you trust your accuracy)](#8-modeling-challenges)
49
+ 9. [License, provenance & citation](#9-license-provenance--citation)
50
+
51
+ ---
52
+
53
+ ## 1. The task: what is Keyword Spotting?
54
+
55
+ **Keyword Spotting (KWS)** is the problem of detecting a small set of predefined words or
56
+ short phrases in an audio stream. The most familiar special case is **wake-word detection**
57
+ (also *hotword* or *trigger-word* detection): a tiny, always-listening model that waits for a
58
+ single phrase — *"Hey Siri"*, *"OK Google"*, *"Alexa"* — and only then wakes up the heavy,
59
+ cloud-based speech recogniser.
60
+
61
+ Formally, given an audio segment $x(t)$ we want a decision function
62
+
63
+ $$
64
+ \hat{y} = \mathbb{1}\!\left[\, p(\text{keyword} \mid x) \ge \tau \,\right],
65
+ $$
66
+
67
+ where $\tau$ is an operating threshold. In this dataset the keyword is the Kyrgyz given name
68
+ **«Акылай»** (three syllables, stress on the final *-ай*), and the task is reduced to its
69
+ cleanest form: **binary classification of pre-segmented 2-second-scale clips** — keyword vs.
70
+ non-keyword.
71
+
72
+ KWS has several properties that make it a richer teaching example than tabular toy datasets:
73
+
74
+ - **Strong class imbalance.** In deployment the keyword is vanishingly rare (a wake word may
75
+ fire a handful of times per day against hours of non-keyword audio). Here we use a gentle
76
+ **1 : 3** ratio — enough to make *accuracy misleading* without being degenerate.
77
+ - **Asymmetric error costs.** A *false reject* (missing the keyword) annoys the user once; a
78
+ *false accept* (waking up on a TV advert) is far worse. This motivates the whole
79
+ precision/recall/threshold toolkit rather than a single accuracy number.
80
+ - **A meaningful feature-engineering step.** Audio is not naturally tabular. Turning a
81
+ waveform into a fixed-length vector is itself a modelling decision — and a great lesson.
82
+
83
+ ---
84
+
85
+ ## 2. A short history of wake words
86
+
87
+ - **1950s–60s — first isolated-word recognisers.** Bell Labs' *Audrey* (1952) recognised
88
+ spoken digits from a single speaker; IBM's *Shoebox* (1962) handled 16 words. These were
89
+ analog/template machines, but they established the core idea of matching short acoustic
90
+ patterns.
91
+ - **1970s–80s — features and dynamic time warping.** The **cepstrum** and then **Mel-Frequency
92
+ Cepstral Coefficients (MFCCs)** (Davis & Mermelstein, 1980) became the standard front-end,
93
+ and **DTW** allowed matching words of different durations.
94
+ - **1980s–2000s — statistical models.** **Hidden Markov Models (HMMs)** with Gaussian Mixture
95
+ emissions dominated speech. Classic KWS was often **keyword-filler HMMs**: one model for the
96
+ keyword, a "garbage" model for everything else.
97
+ - **2014 — the deep-learning turning point for KWS.** Google's *"Small-footprint keyword
98
+ spotting using deep neural networks"* (Chen, Parada & Heigold, 2014) showed a compact DNN on
99
+ log-mel features beating the HMM pipeline — the recipe behind *"OK Google"* on-device.
100
+ - **2014–2017 — the smart-speaker era.** *Amazon Echo / Alexa* (2014), *"Hey Siri"* on a
101
+ dedicated low-power core (2017), and *"OK Google"* turned always-on wake-word detection into
102
+ a mass-market component. Constraints became extreme: a few **tens of kilobytes** of
103
+ parameters, running continuously at milliwatts.
104
+ - **2018–present — convolutional & streaming models.** Architectures such as
105
+ **TC-ResNet**, **BC-ResNet**, and depthwise-separable CNNs pushed accuracy up while keeping
106
+ the model tiny enough for an MCU/NPU.
107
+
108
+ This dataset's parent project trains exactly such a tiny on-device model (a ~30 K-parameter
109
+ BC-ResNet) for «Акылай». **The features you have here are the *classical* front-end** —
110
+ MFCCs and spectral descriptors — which is both historically faithful and a perfect bridge
111
+ from "linear models on tables" to "real speech".
112
+
113
+ ---
114
+
115
+ ## 3. Where the audio comes from (provenance)
116
+
117
+ The clips come from **four different sources**, recorded in the `source` column. The single
118
+ most important thing to understand about this dataset is the split between **synthetic
119
+ (text-to-speech, TTS)** audio and **real human** audio.
120
+
121
+ | `source` | `label` | n | Synthetic / real | What it is |
122
+ |---|:---:|---:|---|---|
123
+ | `positive` | **1** | 10 000 | **TTS** (in-house Kyrgyz TTS) | The wake word **«Акылай»**, spoken by a Kyrgyz text-to-speech model trained on podcast voices. |
124
+ | `base_neg` | 0 | 7 680 | **TTS** (*same* engine as positives) | Other Kyrgyz words/phrases from the **same** TTS voice — *not* the wake word. |
125
+ | `confusable` | 0 | 2 949 | **TTS** (KaniTTS, a *different* engine) | Phonetic near-neighbours — words ending in *-ай / -лай / -кай / -бай* (e.g. *Алтынай, калай, чай, лайк*) designed to look "almost" like the keyword. |
126
+ | `podcast` | 0 | 19 371 | **Real human speech** | 2-second cuts of continuous Kyrgyz podcast speech — natural, spontaneous, with no wake word. |
127
+
128
+ **Why this matters (and why we keep `source`).** The negatives are not homogeneous:
129
+
130
+ - `podcast` is **real, out-of-domain** audio → in practice it is *easy* to separate from the
131
+ synthetic positives, partly for the wrong reason (the model can latch onto "synthetic vs.
132
+ real" timbre rather than the word itself — a classic **shortcut**).
133
+ - `base_neg` shares the **exact same TTS voice** as the positives, so the *only* thing
134
+ distinguishing it from a positive is the **word** → this is the **honest, hard** part of the
135
+ problem.
136
+ - `confusable` tests robustness to **phonetically similar words**.
137
+
138
+ The `source` column is **not a feature** — never feed it to the model. It is provided for
139
+ **error analysis**: *which kind of negative does your model actually fail on?* (Spoiler from
140
+ our baseline experiments: almost all false positives come from `base_neg`.)
141
+
142
+ > **Wake word.** «Акылай» — a Kyrgyz feminine given name, 3 syllables, stress on `-ай`.
143
+ > All audio is 16 kHz mono.
144
+
145
+ ---
146
+
147
+ ## 4. From a waveform to a feature vector
148
+
149
+ A raw clip is a sequence of $16\,000$ amplitude samples per second — far too high-dimensional
150
+ and variable-length to feed to a classifier directly. The standard speech front-end turns it
151
+ into a compact, fixed-length descriptor in three stages: **framing**, **time–frequency
152
+ transform**, and **feature extraction + aggregation**.
153
+
154
+ ### 4.1 Framing
155
+
156
+ The signal $x(n)$ is cut into overlapping short frames so that each frame is approximately
157
+ **stationary** (the vocal tract changes slowly, ~10 ms scale). We use
158
+
159
+ $$
160
+ N_{\text{fft}} = 512 \;(\approx 32\,\text{ms window}), \qquad H = 160 \;(\approx 10\,\text{ms hop}),
161
+ $$
162
+
163
+ with a **Hann window** $w(n) = 0.5\left(1 - \cos\frac{2\pi n}{N-1}\right)$ to reduce spectral
164
+ leakage.
165
+
166
+ ### 4.2 Short-Time Fourier Transform (STFT)
167
+
168
+ For frame index $m$ and frequency bin $k$,
169
+
170
+ $$
171
+ X(m,k) \;=\; \sum_{n=0}^{N_{\text{fft}}-1} x(n + mH)\, w(n)\, e^{-\,j\,2\pi k n / N_{\text{fft}}}.
172
+ $$
173
+
174
+ From it we form the **magnitude** $|X(m,k)|$ and **power** spectrogram
175
+
176
+ $$
177
+ S(m,k) = |X(m,k)|^2 .
178
+ $$
179
+
180
+ The bin $k$ corresponds to physical frequency $f_k = \dfrac{k}{N_{\text{fft}}}\, f_s$, with
181
+ $f_s = 16\,000$ Hz. Everything below is computed **per frame** $m$ and then aggregated over
182
+ time (§6).
183
+
184
+ ---
185
+
186
+ ## 5. The features, in detail (with formulas)
187
+
188
+ We extract **12 groups** of descriptors. They fall into three families:
189
+
190
+ - **Cepstral** (MFCC + dynamics) — compact model of the spectral *envelope* (the vocal-tract
191
+ shape that defines phonemes).
192
+ - **Spectral shape** (centroid, bandwidth, roll-off, flatness, contrast) — interpretable
193
+ scalar summaries of *where* and *how* spectral energy is distributed ("timbre").
194
+ - **Energy / harmonicity / time-domain** (RMS, chroma, ZCR) — loudness, pitch-class content,
195
+ and a rough voicing/noisiness cue.
196
+
197
+ ### 5.1 Mel filterbank and log-mel energies
198
+
199
+ Human pitch perception is roughly logarithmic, captured by the **mel scale**
200
+
201
+ $$
202
+ \text{mel}(f) = 2595 \,\log_{10}\!\left(1 + \frac{f}{700}\right).
203
+ $$
204
+
205
+ We place $M = 40$ overlapping **triangular filters** $H_j(k)$ equally spaced on the mel axis
206
+ and integrate the power spectrum through them:
207
+
208
+ $$
209
+ E_{\text{mel}}(m,j) \;=\; \sum_{k} H_j(k)\, S(m,k), \qquad j = 1,\dots,40 .
210
+ $$
211
+
212
+ The dataset stores the **log (dB) mel energies** $\;10\log_{10} E_{\text{mel}}(m,j)\;$
213
+ (columns `mel0…mel39`). *Interpretation:* a coarse, perceptually-warped picture of the spectral
214
+ envelope — high values in low-mel bands mean energy concentrated at low pitch, etc.
215
+
216
+ ### 5.2 Mel-Frequency Cepstral Coefficients (MFCC)
217
+
218
+ MFCCs decorrelate the log-mel vector with a **Discrete Cosine Transform (DCT-II)**:
219
+
220
+ $$
221
+ c(m,i) \;=\; \sum_{j=1}^{M} \log E_{\text{mel}}(m,j)\,
222
+ \cos\!\left[\frac{\pi i}{M}\left(j - \tfrac{1}{2}\right)\right], \qquad i = 0,\dots,19 .
223
+ $$
224
+
225
+ We keep the first **20** coefficients (`mfcc0…mfcc19`). Low-order coefficients capture the
226
+ **smooth spectral envelope** (formant structure → which phoneme is spoken); $c(m,0)$ is
227
+ proportional to overall log-energy. MFCCs are the single most important speech feature
228
+ historically and are nearly **uncorrelated**, which suits linear models well.
229
+
230
+ ### 5.3 Delta ($\Delta$) and delta-delta ($\Delta\Delta$) coefficients
231
+
232
+ A single frame says nothing about *motion*. The **delta** features approximate the temporal
233
+ derivative of each coefficient with a regression over $\pm\Theta$ frames:
234
+
235
+ $$
236
+ \Delta c(m,i) \;=\; \frac{\displaystyle\sum_{\theta=1}^{\Theta} \theta\,\bigl[c(m+\theta,i) - c(m-\theta,i)\bigr]}
237
+ {\displaystyle 2\sum_{\theta=1}^{\Theta} \theta^{2}} .
238
+ $$
239
+
240
+ The **delta-delta** (acceleration) features are the deltas of the deltas. Columns
241
+ `d1_0…d1_19` ($\Delta$) and `d2_0…d2_19` ($\Delta\Delta$). *Interpretation:* how fast the
242
+ spectrum is changing — crucial for distinguishing a short, dynamic spoken word from
243
+ quasi-stationary noise or music.
244
+
245
+ ### 5.4 Spectral centroid
246
+
247
+ The "centre of mass" of the spectrum — a strong correlate of perceived **brightness**:
248
+
249
+ $$
250
+ \text{centroid}(m) \;=\; \frac{\sum_{k} f_k \,|X(m,k)|}{\sum_{k} |X(m,k)|}.
251
+ $$
252
+
253
+ ### 5.5 Spectral bandwidth
254
+
255
+ The spread of energy around the centroid (here the $p=2$, i.e. standard-deviation, form):
256
+
257
+ $$
258
+ \text{bandwidth}(m) \;=\;
259
+ \left( \frac{\sum_{k} |X(m,k)|\,\bigl(f_k - \text{centroid}(m)\bigr)^{2}}
260
+ {\sum_{k} |X(m,k)|} \right)^{1/2}.
261
+ $$
262
+
263
+ ### 5.6 Spectral roll-off
264
+
265
+ The frequency $f_R(m)$ below which a fraction $\rho = 0.85$ of the total spectral energy lies:
266
+
267
+ $$
268
+ f_R(m) = \min\Big\{ f_K \;:\; \sum_{k:\,f_k \le f_K} |X(m,k)| \;\ge\; \rho \sum_{k} |X(m,k)| \Big\}.
269
+ $$
270
+
271
+ Separates voiced/low-frequency-dominated frames from broadband/fricative ones.
272
+
273
+ ### 5.7 Spectral flatness
274
+
275
+ The ratio of the **geometric** to the **arithmetic** mean of the power spectrum — a
276
+ *tonality vs. noisiness* measure in $[0,1]$:
277
+
278
+ $$
279
+ \text{flatness}(m) \;=\;
280
+ \frac{\exp\!\left(\frac{1}{K}\sum_{k}\ln S(m,k)\right)}{\frac{1}{K}\sum_{k} S(m,k)}.
281
+ $$
282
+
283
+ A value near $1$ ⇒ white-noise-like (flat); near $0$ ⇒ tonal/harmonic (peaky), as in voiced
284
+ speech. Very useful for telling speech from noise/music.
285
+
286
+ ### 5.8 Spectral contrast
287
+
288
+ For each of **7 sub-bands** $b$, the (log) difference between the strongest **peaks** and the
289
+ weakest **valleys** in that band:
290
+
291
+ $$
292
+ \text{contrast}(m,b) \;=\; \overline{\text{Peak}}_b(m) \;-\; \overline{\text{Valley}}_b(m),
293
+ $$
294
+
295
+ where the peak/valley terms are the mean log-energies of the top/bottom quantile of bins in
296
+ band $b$. High contrast ⇒ clear harmonic structure (formants stand out over the noise floor).
297
+ Columns `contrast0…contrast6`. *In our baseline this was the single most informative group.*
298
+
299
+ ### 5.9 Chroma
300
+
301
+ Projects the spectrum onto the **12 pitch classes** of the equal-tempered scale:
302
+
303
+ $$
304
+ \text{chroma}(m,p) \;=\; \sum_{k\,:\,\text{pitch-class}(f_k)=p} |X(m,k)|, \qquad p = 0,\dots,11 .
305
+ $$
306
+
307
+ Octave-invariant harmonic content. Borrowed from music IR; for speech it is a weak but
308
+ non-trivial cue. Columns `chroma0…chroma11`.
309
+
310
+ ### 5.10 Zero-Crossing Rate (ZCR)
311
+
312
+ A cheap time-domain measure of how often the waveform changes sign within a frame of length $L$:
313
+
314
+ $$
315
+ \text{ZCR}(m) \;=\; \frac{1}{2L}\sum_{n}\bigl|\operatorname{sgn} x(n) - \operatorname{sgn} x(n-1)\bigr|.
316
+ $$
317
+
318
+ High ZCR ⇒ noisy/fricative/unvoiced; low ZCR ⇒ voiced/low-frequency. A classic voicing proxy.
319
+
320
+ ### 5.11 Root-Mean-Square energy (RMS)
321
+
322
+ Per-frame loudness:
323
+
324
+ $$
325
+ \text{RMS}(m) \;=\; \sqrt{\frac{1}{L}\sum_{n} x(n)^{2}} .
326
+ $$
327
+
328
+ Tracks the speech envelope (syllable onsets/offsets, silences).
329
+
330
+ ---
331
+
332
+ ## 6. Temporal aggregation: variable-length audio → fixed vector
333
+
334
+ The features above produce **one value per frame**, so a clip is a *matrix* $\phi(m)$ of shape
335
+ (features × frames), and clips have **different numbers of frames** (different durations).
336
+ Classical models need a **fixed-length** vector. We therefore summarise each per-frame feature
337
+ $\phi$ over its $T$ frames by its **mean** and **standard deviation**:
338
+
339
+ $$
340
+ \mu_\phi = \frac{1}{T}\sum_{m=1}^{T} \phi(m), \qquad
341
+ \sigma_\phi = \sqrt{\frac{1}{T}\sum_{m=1}^{T}\bigl(\phi(m) - \mu_\phi\bigr)^{2}} .
342
+ $$
343
+
344
+ Hence every group contributes **two** columns per channel (`…_mean`, `…_std`), and *every clip
345
+ maps to the same 250-dimensional vector* regardless of length. The `std` summaries turn out to
346
+ be very informative — they encode *how much the spectrum moves over time*, which separates a
347
+ short spoken word from stationary background. (In our baseline, several `…_std` features rank
348
+ at the very top of tree-based feature importances.)
349
+
350
+ > **Design choice / leakage note.** Clip **duration is deliberately *not* a feature.** In the
351
+ > raw corpus all `podcast` negatives are exactly 2.000 s while positives are shorter, so
352
+ > duration alone would let a model "cheat". Aggregating to mean/std makes the descriptor
353
+ > length-invariant and removes that shortcut. (The deeper *synthetic-vs-real* shortcut remains
354
+ > — see §8.)
355
+
356
+ ### Feature budget (250 total)
357
+
358
+ | Group | Per-frame channels | × {mean, std} | Columns |
359
+ |---|---:|---:|---:|
360
+ | MFCC | 20 | 2 | 40 |
361
+ | $\Delta$ MFCC | 20 | 2 | 40 |
362
+ | $\Delta\Delta$ MFCC | 20 | 2 | 40 |
363
+ | log-mel energies | 40 | 2 | 80 |
364
+ | spectral contrast | 7 | 2 | 14 |
365
+ | chroma | 12 | 2 | 24 |
366
+ | centroid | 1 | 2 | 2 |
367
+ | bandwidth | 1 | 2 | 2 |
368
+ | roll-off | 1 | 2 | 2 |
369
+ | flatness | 1 | 2 | 2 |
370
+ | ZCR | 1 | 2 | 2 |
371
+ | RMS | 1 | 2 | 2 |
372
+ | **Total** | | | **250** |
373
+
374
+ ---
375
+
376
+ ## 7. Dataset schema
377
+
378
+ One parquet file, **40 000 rows × 252 columns**, all features `float32`, no missing values.
379
+
380
+ | Column(s) | Type | Role | Notes |
381
+ |---|---|---|---|
382
+ | `mfcc{0..19}_{mean,std}` | float32 | feature | cepstral envelope |
383
+ | `d1_{0..19}_{mean,std}` | float32 | feature | $\Delta$ MFCC |
384
+ | `d2_{0..19}_{mean,std}` | float32 | feature | $\Delta\Delta$ MFCC |
385
+ | `mel{0..39}_{mean,std}` | float32 | feature | log-mel energies (dB) |
386
+ | `contrast{0..6}_{mean,std}` | float32 | feature | spectral contrast |
387
+ | `chroma{0..11}_{mean,std}` | float32 | feature | pitch-class energy |
388
+ | `centroid_{mean,std}` | float32 | feature | brightness |
389
+ | `bandwidth_{mean,std}` | float32 | feature | spectral spread |
390
+ | `rolloff_{mean,std}` | float32 | feature | 85 % roll-off freq. |
391
+ | `flatness_{mean,std}` | float32 | feature | tonality |
392
+ | `zcr_{mean,std}` | float32 | feature | zero-crossing rate |
393
+ | `rms_{mean,std}` | float32 | feature | loudness |
394
+ | **`label`** | int | **target** | `1` = «Акылай», `0` = negative |
395
+ | **`source`** | string | **metadata** | `positive` / `base_neg` / `confusable` / `podcast` — **do not train on this** |
396
+
397
+ **Class balance:** 10 000 positive / 30 000 negative (**25 % positive, 1 : 3**).
398
+
399
+ ---
400
+
401
+ ## 8. Modeling challenges
402
+
403
+ This is where the dataset earns its keep as a teaching tool. Things students *should* run into:
404
+
405
+ 1. **Class imbalance → accuracy lies.** A constant "always negative" classifier already scores
406
+ **75 % accuracy** but is useless (F1 = 0, PR-AUC = 0.25). Insist on **precision, recall,
407
+ F1, ROC-AUC, and especially PR-AUC**, plus the confusion matrix. Tools to discuss:
408
+ `class_weight="balanced"`, threshold tuning, resampling.
409
+
410
+ 2. **The synthetic-vs-real shortcut (the big one).** Positives are TTS; `podcast` negatives are
411
+ real human speech. A model can score deceptively well by learning *"synthetic timbre vs.
412
+ real"* instead of *"the word Akylai vs. other words"*. The antidote is **per-`source` error
413
+ analysis**: evaluate false-positive rate **separately** on `podcast`, `base_neg`, and
414
+ `confusable`. The honest difficulty lives in `base_neg` (same TTS voice, different word).
415
+
416
+ 3. **Operating point & asymmetric costs.** F1 is not the deployment metric; real KWS cares
417
+ about *recall at a fixed false-alarm rate*. Sweep the threshold $\tau$ and read off the
418
+ precision/recall trade-off — a natural lead-in to ROC and PR curves.
419
+
420
+ 4. **Feature scaling matters — but only for some models.** Distance/margin-based learners
421
+ (Logistic Regression, SVM, k-NN) need `StandardScaler`; tree ensembles
422
+ (Random Forest, Gradient Boosting) are scale-invariant. A clean side-by-side lesson.
423
+
424
+ 5. **High dimensionality & redundancy.** 250 features, many correlated (MFCC vs. mel; mean vs.
425
+ std). Good ground for regularisation ($L_1/L_2$), feature importance, and dimensionality
426
+ reduction. Note that in a 2-D **PCA** projection the classes **overlap heavily** — a useful
427
+ reminder that "I can't see a boundary in 2-D" does *not* mean the classes are inseparable in
428
+ 250-D.
429
+
430
+ 6. **Speaker / generator leakage.** Positives come from a limited set of synthetic voices; a
431
+ purely random train/test split can leak speaker identity and **inflate** scores. A stricter
432
+ evaluation would split by speaker or by source. Worth at least *discussing*.
433
+
434
+ 7. **It's "easy enough" to be encouraging, hard enough to be real.** Even a linear model
435
+ reaches high PR-AUC on these features, so beginners get a rewarding result quickly — while
436
+ the per-source breakdown leaves a genuine, interpretable hard core to dig into.
437
+
438
+ ---
439
+
440
+
441
+ ## 9. License, provenance & citation
442
+
443
+ - **License:** Apache-2.0.
444
+ - **Languages:** Kyrgyz (`ky`), with some Russian (`ru`) confusables.
445
+ - **Audio provenance:** positives and `base_neg` are generated by an in-house Kyrgyz
446
+ text-to-speech model (trained on podcast voices); `confusable` clips are generated by
447
+ **KaniTTS**; `podcast` negatives are 2-second cuts of real Kyrgyz-language podcast speech.
448
+ Features were extracted with `librosa` (16 kHz, $N_{\text{fft}}=512$, hop $=160$).
449
+ - **Parent project:** the «Акылай» on-device wake-word detector
450
+ (`KaniTTS-research-team/AkylAi_Wake_Word_V4`). This features table is a derived, tabular
451
+ **teaching** snapshot — it does **not** contain audio.
452
+
453
+ ```bibtex
454
+ @misc{akylai_kws_features,
455
+ title = {Akylai KWS Features: An Educational Spectral-Feature Dataset for Keyword Spotting},
456
+ author = {AkylAi Wake Word project},
457
+ year = {2026},
458
+ note = {Derived tabular features (MFCC + spectral descriptors) over the Akylai wake-word corpus},
459
+ license = {Apache-2.0}
460
+ }
461
+ ```
462
+
463
+ > **Educational use.** This dataset is intended for teaching classification and audio feature
464
+ > engineering. The synthetic positives and the domain split between TTS and real speech make it
465
+ > unsuitable as-is for benchmarking a production wake-word detector.