forked from briansm-github/bluepill_voice_keyboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cb.h
94 lines (91 loc) · 3.06 KB
/
cb.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// Sectrum-to-Phoneme codebook
// Each line is 9 FFT bins and the phoneme they represent
#define CBSIZE 80
PROGMEM const unsigned char cb[CBSIZE][10]={
0, 0, 0, 0, 0, 0, 0, 0, 0,'_', //11
0, 60, 12, 33, 46, 86, 83, 69, 73,'k', //16
0, 30, 48, 55,111,160,129,101, 89,'C', //16
0, 51, 42, 78, 94, 89,144,106, 95,'t', //17
0, 58, 7, 18, 44, 87, 95, 74, 84,'k', //17
0, 42, 39, 50, 55, 82, 87, 77, 41,'g', //17
0, 26, 52, 62,110,159,184,170,126,'h', //17
0, 48, 42, 66, 87, 84,138, 88,137,'t', //17
0, 47, 30, 4, 19, 64,112, 74, 55,'d', //18
0, 26, 67, 74,135,173,177,215,137,'S', //18
0, 23, 28, 10, 47, 80,119,156, 88,'d', //18
0, 52, 45, 20, 28, 69, 83, 79,124,'d', //19
0, 48, 52, 97, 88,102, 78, 74,122,'f', //19
0, 26, 69, 75,100,113,151,152,193,'s', //19
77, 0, 23, 25, 41, 79, 91,103,130,'s', //29
145, 79, 0, 4, 18, 44, 50, 89, 44,'E', //31
156, 12, 0, 34, 48, 71, 58, 77, 52,'f', //31
7, 39, 0, 72, 81, 33, 28, 43, 14,'b', //35
104,124, 33, 0, 87, 50, 46, 39, 40,'e', //41
144, 81, 40, 0, 70, 40, 15, 29, 6,'e', //41
163,128, 27, 0, 35,106,129,125, 90,'A', //41
153,114, 29, 0, 44,106, 72, 79, 91,'A', //41
173,103, 13, 0, 26,111,106,100, 75,'E', //41
161,129, 16, 0, 56,110, 62, 59, 32,'O', //41
132, 72, 5, 0, 19,131, 78, 76, 85,'E', //41
149,172, 28, 0, 66, 68, 51, 53, 57,'e', //42
107,141, 28, 0, 45,110, 75, 79, 31,'A', //42
109,135, 13, 0,115, 60, 21, 54, 10,'O', //42
76, 68, 41, 0, 28, 17, 90, 6, 60,'k', //47
148,119,163, 56, 0, 37, 4, 15, 58,'e', //51
151,130,177, 55, 0, 25, 37, 46, 59,'a', //51
67, 54, 38, 23, 0, 10, 54, 19, 49,'k', //51
193,218,119, 16, 0, 28, 39, 16, 51,'o', //52
133,167,108, 43, 0, 10, 61, 56, 87,'l', //52
130,142,177, 54, 0, 24, 47, 62, 9,'a', //53
83, 84, 81,104, 0, 19, 18, 35, 29,'l', //54
82, 52, 79, 98, 0, 25, 13, 41, 50,'E', //54
133, 83,100, 54, 9, 0, 49, 24, 21,'a', //61
173,111,109, 64, 6, 0, 33, 52, 38,'l', //61
167,116, 44, 53, 39, 67, 0, 7, 14,'m', //71
162, 74, 50, 20, 38, 38, 0, 32, 8,'m', //71
147, 92,127, 77, 19, 35, 0, 15, 19,'r', //71
164,130,139, 93, 60, 36, 0, 53, 28,'r', //71
116, 65, 84,103, 12, 49, 0, 42, 28,'a', //71
171,148,178, 74, 27,141, 0, 20, 66,'r', //73
139,111, 98,125, 26, 43, 11, 0, 87,'l', //81
123, 79, 54, 43, 35, 26, 14, 0, 60,'l', //81
117,154, 95, 28, 7, 34, 10, 0, 8,'w', //82
132, 71, 48, 9, 33, 15, 14, 50, 0,'e', //91
144, 35, 31, 22, 29, 25, 39, 30, 0,'n', //91
173,127,137,100, 67, 35, 4, 29, 0,'n', //91
161, 83, 92, 59, 27, 33, 14, 58, 0,'l', //91
192,144, 51, 41, 48, 42, 15, 1, 0,'f', //91
38, 71, 6, 23, 96, 72, 41, 35, 0,'b', //95
};
// First-2-Phonemes-to-keystroke codebook
#define KEYS 28
PROGMEM const unsigned char cbp[KEYS][3]={
'A', 0,'a',
'b','E','b',
's','E','c',
'd','E','d',
'E', 0,'e',
'e','f','f',
'g','E','g',
'A','C','h',
'a','E','i',
'j','A','j',
'k','A','k',
'e','l','l',
'e','m','m',
'e','n','n',
'o', 0,'o',
'b','f','p',
'k','O','q',
'a','r','r',
'e','s','s',
't','E','t',
'E','O','u',
'f','E','v',
'd','u','w',
'e','k','x',
'w','a','y',
's','e','z',
's','b',' ',
'b','a',127, // backspace
};