@convai/web-sdk 0.2.4 → 0.3.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +535 -1031
- package/dist/core/AudioManager.d.ts.map +1 -1
- package/dist/core/AudioManager.js +0 -5
- package/dist/core/AudioManager.js.map +1 -1
- package/dist/core/BlendshapeQueue.d.ts +128 -0
- package/dist/core/BlendshapeQueue.d.ts.map +1 -0
- package/dist/core/BlendshapeQueue.js +229 -0
- package/dist/core/BlendshapeQueue.js.map +1 -0
- package/dist/core/ConvaiClient.d.ts +19 -0
- package/dist/core/ConvaiClient.d.ts.map +1 -1
- package/dist/core/ConvaiClient.js +67 -29
- package/dist/core/ConvaiClient.js.map +1 -1
- package/dist/core/MessageHandler.d.ts +7 -0
- package/dist/core/MessageHandler.d.ts.map +1 -1
- package/dist/core/MessageHandler.js +35 -2
- package/dist/core/MessageHandler.js.map +1 -1
- package/dist/core/ScreenShareManager.d.ts.map +1 -1
- package/dist/core/ScreenShareManager.js +0 -3
- package/dist/core/ScreenShareManager.js.map +1 -1
- package/dist/core/VideoManager.d.ts.map +1 -1
- package/dist/core/VideoManager.js +0 -4
- package/dist/core/VideoManager.js.map +1 -1
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/types.d.ts +19 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lipsync-helpers/arkitBlendshapeHelpers.d.ts +80 -0
- package/dist/lipsync-helpers/arkitBlendshapeHelpers.d.ts.map +1 -0
- package/dist/lipsync-helpers/arkitBlendshapeHelpers.js +201 -0
- package/dist/lipsync-helpers/arkitBlendshapeHelpers.js.map +1 -0
- package/dist/lipsync-helpers/arkitOrder61.d.ts +121 -0
- package/dist/lipsync-helpers/arkitOrder61.d.ts.map +1 -0
- package/dist/lipsync-helpers/arkitOrder61.js +287 -0
- package/dist/lipsync-helpers/arkitOrder61.js.map +1 -0
- package/dist/lipsync-helpers/arkitPhonemeReference.d.ts +155 -0
- package/dist/lipsync-helpers/arkitPhonemeReference.d.ts.map +1 -0
- package/dist/lipsync-helpers/arkitPhonemeReference.js +362 -0
- package/dist/lipsync-helpers/arkitPhonemeReference.js.map +1 -0
- package/dist/lipsync-helpers/index.d.ts +10 -0
- package/dist/lipsync-helpers/index.d.ts.map +1 -0
- package/dist/lipsync-helpers/index.js +21 -0
- package/dist/lipsync-helpers/index.js.map +1 -0
- package/dist/lipsync-helpers/metahumanOrder251.d.ts +115 -0
- package/dist/lipsync-helpers/metahumanOrder251.d.ts.map +1 -0
- package/dist/lipsync-helpers/metahumanOrder251.js +432 -0
- package/dist/lipsync-helpers/metahumanOrder251.js.map +1 -0
- package/dist/lipsync-helpers/neurosyncBlendshapeMapper.d.ts +30 -0
- package/dist/lipsync-helpers/neurosyncBlendshapeMapper.d.ts.map +1 -0
- package/dist/lipsync-helpers/neurosyncBlendshapeMapper.js +315 -0
- package/dist/lipsync-helpers/neurosyncBlendshapeMapper.js.map +1 -0
- package/dist/react/components/ConvaiWidget.d.ts.map +1 -1
- package/dist/react/components/ConvaiWidget.js +43 -3
- package/dist/react/components/ConvaiWidget.js.map +1 -1
- package/dist/react/hooks/useCharacterInfo.d.ts.map +1 -1
- package/dist/react/hooks/useCharacterInfo.js +1 -1
- package/dist/react/hooks/useCharacterInfo.js.map +1 -1
- package/dist/react/hooks/useConvaiClient.d.ts.map +1 -1
- package/dist/react/hooks/useConvaiClient.js +5 -0
- package/dist/react/hooks/useConvaiClient.js.map +1 -1
- package/dist/utils/speakerManagement.d.ts.map +1 -1
- package/dist/utils/speakerManagement.js +0 -5
- package/dist/utils/speakerManagement.js.map +1 -1
- package/dist/vanilla/AudioRenderer.d.ts +5 -0
- package/dist/vanilla/AudioRenderer.d.ts.map +1 -1
- package/dist/vanilla/AudioRenderer.js +27 -18
- package/dist/vanilla/AudioRenderer.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ARKit Blendshape Reference Values for Phonemes/Visemes
|
|
3
|
+
*
|
|
4
|
+
* This file provides reference values for ARKit's 52 standard facial blendshapes
|
|
5
|
+
* when forming different phonemes (speech sounds). These values are based on
|
|
6
|
+
* industry standards from systems like OVR LipSync, Oculus Audio, and ARKit face tracking.
|
|
7
|
+
*
|
|
8
|
+
* All blendshape values range from 0.0 (no activation) to 1.0 (full activation)
|
|
9
|
+
*
|
|
10
|
+
* ARKit Blendshapes: Indices 0-51
|
|
11
|
+
* Meta Human Extended: Indices 52-250
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Reference values for common phonemes
|
|
15
|
+
* Based on International Phonetic Alphabet (IPA) and Arpabet standards
|
|
16
|
+
*/
|
|
17
|
+
export const ARKIT_PHONEME_REFERENCE_VALUES = {
|
|
18
|
+
// ============================================
|
|
19
|
+
// SILENCE / NEUTRAL
|
|
20
|
+
// ============================================
|
|
21
|
+
sil: {
|
|
22
|
+
jawOpen: 0.0,
|
|
23
|
+
mouthClose: 1.0,
|
|
24
|
+
description: "Silence - mouth closed, neutral expression"
|
|
25
|
+
},
|
|
26
|
+
// ============================================
|
|
27
|
+
// VOWELS
|
|
28
|
+
// ============================================
|
|
29
|
+
aa: {
|
|
30
|
+
jawOpen: 0.7,
|
|
31
|
+
mouthFunnel: 0.0,
|
|
32
|
+
mouthPucker: 0.0,
|
|
33
|
+
tongueOut: 0.1,
|
|
34
|
+
description: "Open back vowel - 'ah' (father, hot)"
|
|
35
|
+
},
|
|
36
|
+
ae: {
|
|
37
|
+
jawOpen: 0.5,
|
|
38
|
+
mouthStretchLeft: 0.4,
|
|
39
|
+
mouthStretchRight: 0.4,
|
|
40
|
+
description: "Near-open front vowel - 'a' (cat, bat)"
|
|
41
|
+
},
|
|
42
|
+
E: {
|
|
43
|
+
jawOpen: 0.4,
|
|
44
|
+
mouthStretchLeft: 0.3,
|
|
45
|
+
mouthStretchRight: 0.3,
|
|
46
|
+
mouthSmileLeft: 0.2,
|
|
47
|
+
mouthSmileRight: 0.2,
|
|
48
|
+
description: "Open-mid front vowel - 'eh' (bed, get)"
|
|
49
|
+
},
|
|
50
|
+
I: {
|
|
51
|
+
jawOpen: 0.1,
|
|
52
|
+
mouthStretchLeft: 0.6,
|
|
53
|
+
mouthStretchRight: 0.6,
|
|
54
|
+
mouthSmileLeft: 0.5,
|
|
55
|
+
mouthSmileRight: 0.5,
|
|
56
|
+
mouthClose: 0.3,
|
|
57
|
+
description: "Close front vowel - 'ee' (see, feet)"
|
|
58
|
+
},
|
|
59
|
+
ih: {
|
|
60
|
+
jawOpen: 0.2,
|
|
61
|
+
mouthStretchLeft: 0.4,
|
|
62
|
+
mouthStretchRight: 0.4,
|
|
63
|
+
mouthSmileLeft: 0.3,
|
|
64
|
+
mouthSmileRight: 0.3,
|
|
65
|
+
description: "Near-close front vowel - 'i' (sit, bit)"
|
|
66
|
+
},
|
|
67
|
+
O: {
|
|
68
|
+
jawOpen: 0.5,
|
|
69
|
+
mouthFunnel: 0.6,
|
|
70
|
+
mouthPucker: 0.3,
|
|
71
|
+
description: "Close-mid back rounded vowel - 'oh' (go, boat)"
|
|
72
|
+
},
|
|
73
|
+
aw: {
|
|
74
|
+
jawOpen: 0.6,
|
|
75
|
+
mouthFunnel: 0.4,
|
|
76
|
+
mouthPucker: 0.2,
|
|
77
|
+
description: "Open-mid back rounded vowel - 'aw' (thought, caught)"
|
|
78
|
+
},
|
|
79
|
+
U: {
|
|
80
|
+
jawOpen: 0.2,
|
|
81
|
+
mouthFunnel: 0.8,
|
|
82
|
+
mouthPucker: 0.9,
|
|
83
|
+
description: "Close back rounded vowel - 'oo' (food, boot)"
|
|
84
|
+
},
|
|
85
|
+
uh: {
|
|
86
|
+
jawOpen: 0.25,
|
|
87
|
+
mouthFunnel: 0.5,
|
|
88
|
+
mouthPucker: 0.6,
|
|
89
|
+
description: "Near-close back rounded vowel - 'u' (book, foot)"
|
|
90
|
+
},
|
|
91
|
+
er: {
|
|
92
|
+
jawOpen: 0.35,
|
|
93
|
+
mouthFunnel: 0.3,
|
|
94
|
+
mouthPucker: 0.1,
|
|
95
|
+
description: "R-colored mid-central vowel - 'er' (her, bird)"
|
|
96
|
+
},
|
|
97
|
+
ah: {
|
|
98
|
+
jawOpen: 0.4,
|
|
99
|
+
mouthFunnel: 0.1,
|
|
100
|
+
description: "Open-mid back vowel - 'uh' (but, cup)"
|
|
101
|
+
},
|
|
102
|
+
// ============================================
|
|
103
|
+
// DIPHTHONGS
|
|
104
|
+
// ============================================
|
|
105
|
+
ow: {
|
|
106
|
+
jawOpen: 0.6,
|
|
107
|
+
mouthFunnel: 0.3,
|
|
108
|
+
mouthPucker: 0.2,
|
|
109
|
+
description: "Diphthong - 'ow' (cow, house)"
|
|
110
|
+
},
|
|
111
|
+
ay: {
|
|
112
|
+
jawOpen: 0.5,
|
|
113
|
+
mouthStretchLeft: 0.3,
|
|
114
|
+
mouthStretchRight: 0.3,
|
|
115
|
+
description: "Diphthong - 'ai' (eye, my)"
|
|
116
|
+
},
|
|
117
|
+
oy: {
|
|
118
|
+
jawOpen: 0.5,
|
|
119
|
+
mouthFunnel: 0.4,
|
|
120
|
+
mouthPucker: 0.3,
|
|
121
|
+
description: "Diphthong - 'oy' (boy, coin)"
|
|
122
|
+
},
|
|
123
|
+
// ============================================
|
|
124
|
+
// CONSONANTS - BILABIALS (both lips)
|
|
125
|
+
// ============================================
|
|
126
|
+
PP: {
|
|
127
|
+
jawOpen: 0.0,
|
|
128
|
+
mouthClose: 1.0,
|
|
129
|
+
mouthPressLeft: 0.5,
|
|
130
|
+
mouthPressRight: 0.5,
|
|
131
|
+
description: "Bilabial stops/nasal - 'p', 'b', 'm' (pat, bat, mat)"
|
|
132
|
+
},
|
|
133
|
+
// ============================================
|
|
134
|
+
// CONSONANTS - LABIODENTAL (teeth on lip)
|
|
135
|
+
// ============================================
|
|
136
|
+
FF: {
|
|
137
|
+
jawOpen: 0.15,
|
|
138
|
+
mouthRollLower: 0.6,
|
|
139
|
+
mouthUpperUpLeft: 0.3,
|
|
140
|
+
mouthUpperUpRight: 0.3,
|
|
141
|
+
description: "Labiodental fricatives - 'f', 'v' (fat, vat)"
|
|
142
|
+
},
|
|
143
|
+
// ============================================
|
|
144
|
+
// CONSONANTS - DENTAL/INTERDENTAL
|
|
145
|
+
// ============================================
|
|
146
|
+
TH: {
|
|
147
|
+
jawOpen: 0.2,
|
|
148
|
+
tongueOut: 0.4,
|
|
149
|
+
mouthUpperUpLeft: 0.2,
|
|
150
|
+
mouthUpperUpRight: 0.2,
|
|
151
|
+
mouthRollLower: 0.2,
|
|
152
|
+
description: "Dental fricatives - 'th' (think, this)"
|
|
153
|
+
},
|
|
154
|
+
// ============================================
|
|
155
|
+
// CONSONANTS - ALVEOLAR (tongue to ridge)
|
|
156
|
+
// ============================================
|
|
157
|
+
DD: {
|
|
158
|
+
jawOpen: 0.3,
|
|
159
|
+
mouthClose: 0.2,
|
|
160
|
+
description: "Alveolar stops - 't', 'd' (tap, dap)"
|
|
161
|
+
},
|
|
162
|
+
SS: {
|
|
163
|
+
jawOpen: 0.15,
|
|
164
|
+
mouthStretchLeft: 0.4,
|
|
165
|
+
mouthStretchRight: 0.4,
|
|
166
|
+
mouthClose: 0.4,
|
|
167
|
+
description: "Alveolar sibilants - 's', 'z' (sap, zap)"
|
|
168
|
+
},
|
|
169
|
+
nn: {
|
|
170
|
+
jawOpen: 0.2,
|
|
171
|
+
mouthClose: 0.3,
|
|
172
|
+
description: "Alveolar nasal - 'n' (nap)"
|
|
173
|
+
},
|
|
174
|
+
l: {
|
|
175
|
+
jawOpen: 0.25,
|
|
176
|
+
tongueOut: 0.2,
|
|
177
|
+
description: "Alveolar lateral approximant - 'l' (lap)"
|
|
178
|
+
},
|
|
179
|
+
// ============================================
|
|
180
|
+
// CONSONANTS - POSTALVEOLAR (behind ridge)
|
|
181
|
+
// ============================================
|
|
182
|
+
CH: {
|
|
183
|
+
jawOpen: 0.2,
|
|
184
|
+
mouthFunnel: 0.3,
|
|
185
|
+
mouthPucker: 0.2,
|
|
186
|
+
description: "Postalveolar affricates - 'ch', 'j' (church, judge)"
|
|
187
|
+
},
|
|
188
|
+
sh: {
|
|
189
|
+
jawOpen: 0.2,
|
|
190
|
+
mouthFunnel: 0.4,
|
|
191
|
+
mouthPucker: 0.3,
|
|
192
|
+
description: "Postalveolar fricatives - 'sh', 'zh' (shoe, measure)"
|
|
193
|
+
},
|
|
194
|
+
// ============================================
|
|
195
|
+
// CONSONANTS - RETROFLEX
|
|
196
|
+
// ============================================
|
|
197
|
+
RR: {
|
|
198
|
+
jawOpen: 0.3,
|
|
199
|
+
mouthFunnel: 0.2,
|
|
200
|
+
mouthPucker: 0.15,
|
|
201
|
+
tongueOut: 0.1,
|
|
202
|
+
description: "Alveolar approximant - 'r' (red)"
|
|
203
|
+
},
|
|
204
|
+
// ============================================
|
|
205
|
+
// CONSONANTS - PALATAL
|
|
206
|
+
// ============================================
|
|
207
|
+
y: {
|
|
208
|
+
jawOpen: 0.2,
|
|
209
|
+
mouthStretchLeft: 0.35,
|
|
210
|
+
mouthStretchRight: 0.35,
|
|
211
|
+
mouthSmileLeft: 0.2,
|
|
212
|
+
mouthSmileRight: 0.2,
|
|
213
|
+
description: "Palatal approximant - 'y' (yes)"
|
|
214
|
+
},
|
|
215
|
+
// ============================================
|
|
216
|
+
// CONSONANTS - VELAR (back of tongue)
|
|
217
|
+
// ============================================
|
|
218
|
+
kk: {
|
|
219
|
+
jawOpen: 0.35,
|
|
220
|
+
description: "Velar stops/nasal - 'k', 'g', 'ng' (kite, go, sing)"
|
|
221
|
+
},
|
|
222
|
+
// ============================================
|
|
223
|
+
// CONSONANTS - GLOTTAL
|
|
224
|
+
// ============================================
|
|
225
|
+
hh: {
|
|
226
|
+
jawOpen: 0.3,
|
|
227
|
+
description: "Glottal fricative - 'h' (hat)"
|
|
228
|
+
},
|
|
229
|
+
// ============================================
|
|
230
|
+
// CONSONANTS - LABIO-VELAR
|
|
231
|
+
// ============================================
|
|
232
|
+
w: {
|
|
233
|
+
jawOpen: 0.15,
|
|
234
|
+
mouthPucker: 0.8,
|
|
235
|
+
mouthFunnel: 0.6,
|
|
236
|
+
description: "Labio-velar approximant - 'w' (wet)"
|
|
237
|
+
},
|
|
238
|
+
};
|
|
239
|
+
/**
|
|
240
|
+
* ARKit Blendshape Indices (0-51)
|
|
241
|
+
* These are Apple's standard 52 facial blendshapes
|
|
242
|
+
*/
|
|
243
|
+
export const ARKIT_BLENDSHAPE_INDICES = {
|
|
244
|
+
browDownLeft: 0,
|
|
245
|
+
browDownRight: 1,
|
|
246
|
+
browInnerUp: 2,
|
|
247
|
+
browOuterUpLeft: 3,
|
|
248
|
+
browOuterUpRight: 4,
|
|
249
|
+
cheekPuff: 5,
|
|
250
|
+
cheekSquintLeft: 6,
|
|
251
|
+
cheekSquintRight: 7,
|
|
252
|
+
eyeBlinkLeft: 8,
|
|
253
|
+
eyeBlinkRight: 9,
|
|
254
|
+
eyeLookDownLeft: 10,
|
|
255
|
+
eyeLookDownRight: 11,
|
|
256
|
+
eyeLookInLeft: 12,
|
|
257
|
+
eyeLookInRight: 13,
|
|
258
|
+
eyeLookOutLeft: 14,
|
|
259
|
+
eyeLookOutRight: 15,
|
|
260
|
+
eyeLookUpLeft: 16,
|
|
261
|
+
eyeLookUpRight: 17,
|
|
262
|
+
eyeSquintLeft: 18,
|
|
263
|
+
eyeSquintRight: 19,
|
|
264
|
+
eyeWideLeft: 20,
|
|
265
|
+
eyeWideRight: 21,
|
|
266
|
+
jawForward: 22,
|
|
267
|
+
jawLeft: 23,
|
|
268
|
+
jawOpen: 24, // 🔑 KEY for mouth opening
|
|
269
|
+
jawRight: 25,
|
|
270
|
+
mouthClose: 26, // 🔑 KEY for mouth closing
|
|
271
|
+
mouthDimpleLeft: 27,
|
|
272
|
+
mouthDimpleRight: 28,
|
|
273
|
+
mouthFrownLeft: 29,
|
|
274
|
+
mouthFrownRight: 30,
|
|
275
|
+
mouthFunnel: 31, // 🔑 KEY for "O" and "oo" sounds
|
|
276
|
+
mouthLeft: 32,
|
|
277
|
+
mouthLowerDownLeft: 33,
|
|
278
|
+
mouthLowerDownRight: 34,
|
|
279
|
+
mouthPressLeft: 35,
|
|
280
|
+
mouthPressRight: 36,
|
|
281
|
+
mouthPucker: 37, // 🔑 KEY for "U" and "w" sounds
|
|
282
|
+
mouthRight: 38,
|
|
283
|
+
mouthRollLower: 39,
|
|
284
|
+
mouthRollUpper: 40,
|
|
285
|
+
mouthShrugLower: 41,
|
|
286
|
+
mouthShrugUpper: 42,
|
|
287
|
+
mouthSmileLeft: 43, // 🔑 KEY for "ee" sounds
|
|
288
|
+
mouthSmileRight: 44, // 🔑 KEY for "ee" sounds
|
|
289
|
+
mouthStretchLeft: 45, // 🔑 KEY for wide mouth shapes
|
|
290
|
+
mouthStretchRight: 46, // 🔑 KEY for wide mouth shapes
|
|
291
|
+
mouthUpperUpLeft: 47,
|
|
292
|
+
mouthUpperUpRight: 48,
|
|
293
|
+
noseSneerLeft: 49,
|
|
294
|
+
noseSneerRight: 50,
|
|
295
|
+
tongueOut: 51 // 🔑 KEY for "th" and "l" sounds
|
|
296
|
+
};
|
|
297
|
+
/**
|
|
298
|
+
* Generate a complete 251-length blendshape array for a specific phoneme
|
|
299
|
+
* @param phoneme - The phoneme key from ARKIT_PHONEME_REFERENCE_VALUES
|
|
300
|
+
* @returns Array of 251 blendshape values
|
|
301
|
+
*/
|
|
302
|
+
export function generatePhonemeBlendshapes(phoneme) {
|
|
303
|
+
const blendshapes = new Array(251).fill(0);
|
|
304
|
+
const values = ARKIT_PHONEME_REFERENCE_VALUES[phoneme];
|
|
305
|
+
// Map phoneme values to ARKit indices (0-51)
|
|
306
|
+
for (const [key, value] of Object.entries(values)) {
|
|
307
|
+
if (key !== 'description' && key in ARKIT_BLENDSHAPE_INDICES) {
|
|
308
|
+
const index = ARKIT_BLENDSHAPE_INDICES[key];
|
|
309
|
+
blendshapes[index] = value;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
return blendshapes;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Pre-generated sample blendshapes for testing and visualization
|
|
316
|
+
* Use these to test your visualization system
|
|
317
|
+
*/
|
|
318
|
+
export const SAMPLE_PHONEME_TESTS = {
|
|
319
|
+
'Silence': generatePhonemeBlendshapes('sil'),
|
|
320
|
+
'A (ah - father)': generatePhonemeBlendshapes('aa'),
|
|
321
|
+
'E (eh - bed)': generatePhonemeBlendshapes('E'),
|
|
322
|
+
'I (ee - see)': generatePhonemeBlendshapes('I'),
|
|
323
|
+
'O (oh - go)': generatePhonemeBlendshapes('O'),
|
|
324
|
+
'U (oo - food)': generatePhonemeBlendshapes('U'),
|
|
325
|
+
'P/B/M': generatePhonemeBlendshapes('PP'),
|
|
326
|
+
'F/V': generatePhonemeBlendshapes('FF'),
|
|
327
|
+
'TH (think)': generatePhonemeBlendshapes('TH'),
|
|
328
|
+
'S/Z': generatePhonemeBlendshapes('SS'),
|
|
329
|
+
'SH (shoe)': generatePhonemeBlendshapes('sh'),
|
|
330
|
+
'CH (church)': generatePhonemeBlendshapes('CH'),
|
|
331
|
+
'W (wet)': generatePhonemeBlendshapes('w'),
|
|
332
|
+
'R (red)': generatePhonemeBlendshapes('RR'),
|
|
333
|
+
'L (lap)': generatePhonemeBlendshapes('l'),
|
|
334
|
+
'K/G': generatePhonemeBlendshapes('kk'),
|
|
335
|
+
};
|
|
336
|
+
/**
|
|
337
|
+
* Get a formatted string showing active blendshapes for a phoneme
|
|
338
|
+
* Useful for debugging and documentation
|
|
339
|
+
*/
|
|
340
|
+
export function getPhonemeDescription(phoneme) {
|
|
341
|
+
const data = ARKIT_PHONEME_REFERENCE_VALUES[phoneme];
|
|
342
|
+
const lines = [data.description, ''];
|
|
343
|
+
for (const [key, value] of Object.entries(data)) {
|
|
344
|
+
if (key !== 'description') {
|
|
345
|
+
lines.push(` ${key}: ${value}`);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
return lines.join('\n');
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Quick reference guide for key blendshapes
|
|
352
|
+
*/
|
|
353
|
+
export const BLENDSHAPE_QUICK_GUIDE = {
|
|
354
|
+
'Open mouth': ['jawOpen'],
|
|
355
|
+
'Close mouth': ['mouthClose'],
|
|
356
|
+
'Round lips (O, oo)': ['mouthFunnel', 'mouthPucker'],
|
|
357
|
+
'Smile (ee)': ['mouthSmileLeft', 'mouthSmileRight', 'mouthStretchLeft', 'mouthStretchRight'],
|
|
358
|
+
'Lips pressed (p, b, m)': ['mouthPressLeft', 'mouthPressRight', 'mouthClose'],
|
|
359
|
+
'Teeth on lip (f, v)': ['mouthRollLower', 'mouthUpperUpLeft', 'mouthUpperUpRight'],
|
|
360
|
+
'Tongue visible (th, l)': ['tongueOut'],
|
|
361
|
+
};
|
|
362
|
+
//# sourceMappingURL=arkitPhonemeReference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arkitPhonemeReference.js","sourceRoot":"","sources":["../../src/lipsync-helpers/arkitPhonemeReference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAoDH;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAuC;IAChF,+CAA+C;IAC/C,oBAAoB;IACpB,+CAA+C;IAC/C,GAAG,EAAE;QACH,OAAO,EAAE,GAAG;QACZ,UAAU,EAAE,GAAG;QACf,WAAW,EAAE,4CAA4C;KAC1D;IAED,+CAA+C;IAC/C,SAAS;IACT,+CAA+C;IAE/C,EAAE,EAAE;QACF,OAAO,EAAE,GAAG;QACZ,WAAW,EAAE,GAAG;QAChB,WAAW,EAAE,GAAG;QAChB,SAAS,EAAE,GAAG;QACd,WAAW,EAAE,sCAAsC;KACpD;I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B,oBAAoB,EAAE,CAAC,aAAa,EAAE,aAAa,CAAC;IACpD,YAAY,EAAE,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,mBAAmB,CAAC;IAC5F,wBAAwB,EAAE,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,YAAY,CAAC;IAC7E,qBAAqB,EAAE,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,mBAAmB,CAAC;IAClF,wBAAwB,EAAE,CAAC,WAAW,CAAC;CACxC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lipsync Helpers
|
|
3
|
+
* Utilities for processing and mapping lipsync/blendshape data
|
|
4
|
+
*/
|
|
5
|
+
export { ARKIT_ORDER_61, STANDARD_ARKIT_ORDER, convertOrder61ToStandard, mapOrder61ToNames, getBlendshapeValueFromOrder61, getHeadRotation, getEyeRotations, getLipSyncValuesFromOrder61, getActiveBlendshapesFromOrder61, formatOrder61ForLogging, } from "./arkitOrder61";
|
|
6
|
+
export { ARKIT_BLENDSHAPE_NAMES, ARKIT_EXTENDED_NAMES, mapARKitBlendshapesToNames, getActiveARKitBlendshapes, getARKitBlendshapeValue, formatARKitBlendshapesForLogging, KEY_LIPSYNC_BLENDSHAPES, getLipSyncBlendshapes, } from "./arkitBlendshapeHelpers";
|
|
7
|
+
export { ARKIT_PHONEME_REFERENCE_VALUES, ARKIT_BLENDSHAPE_INDICES, SAMPLE_PHONEME_TESTS, BLENDSHAPE_QUICK_GUIDE, generatePhonemeBlendshapes, getPhonemeDescription, type PhonemeBlendshapes, } from "./arkitPhonemeReference";
|
|
8
|
+
export { METAHUMAN_ORDER_251, METAHUMAN_CATEGORIES, KEY_METAHUMAN_LIPSYNC, getMetaHumanBlendshapeName, getMetaHumanBlendshapeIndex, getMetaHumanBlendshapesByCategory, formatMetaHumanBlendshapesForLogging, } from "./metahumanOrder251";
|
|
9
|
+
export { NEUROSYNC_BLENDSHAPE_NAMES, mapBlendshapesToNames, formatBlendshapesForLogging, getTopBlendshapes, } from "./neurosyncBlendshapeMapper";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lipsync-helpers/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,wBAAwB,EACxB,iBAAiB,EACjB,6BAA6B,EAC7B,eAAe,EACf,eAAe,EACf,2BAA2B,EAC3B,+BAA+B,EAC/B,uBAAuB,GACxB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,0BAA0B,EAC1B,yBAAyB,EACzB,uBAAuB,EACvB,gCAAgC,EAChC,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,8BAA8B,EAC9B,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,kBAAkB,GACxB,MAAM,yBAAyB,CAAC;AAOjC,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,2BAA2B,EAC3B,iCAAiC,EACjC,oCAAoC,GACrC,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,EACrB,2BAA2B,EAC3B,iBAAiB,GAClB,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lipsync Helpers
|
|
3
|
+
* Utilities for processing and mapping lipsync/blendshape data
|
|
4
|
+
*/
|
|
5
|
+
// ============================================================================
|
|
6
|
+
// ARKIT FORMAT (52 blendshapes + 9 rotation values = 61 total)
|
|
7
|
+
// ============================================================================
|
|
8
|
+
// ARKit 61-Element Custom Order (RECOMMENDED - for direct server data)
|
|
9
|
+
export { ARKIT_ORDER_61, STANDARD_ARKIT_ORDER, convertOrder61ToStandard, mapOrder61ToNames, getBlendshapeValueFromOrder61, getHeadRotation, getEyeRotations, getLipSyncValuesFromOrder61, getActiveBlendshapesFromOrder61, formatOrder61ForLogging, } from "./arkitOrder61";
|
|
10
|
+
// ARKit Blendshape Helpers (for standard ARKit 52-element format)
|
|
11
|
+
export { ARKIT_BLENDSHAPE_NAMES, ARKIT_EXTENDED_NAMES, mapARKitBlendshapesToNames, getActiveARKitBlendshapes, getARKitBlendshapeValue, formatARKitBlendshapesForLogging, KEY_LIPSYNC_BLENDSHAPES, getLipSyncBlendshapes, } from "./arkitBlendshapeHelpers";
|
|
12
|
+
// ARKit Phoneme Reference Values
|
|
13
|
+
export { ARKIT_PHONEME_REFERENCE_VALUES, ARKIT_BLENDSHAPE_INDICES, SAMPLE_PHONEME_TESTS, BLENDSHAPE_QUICK_GUIDE, generatePhonemeBlendshapes, getPhonemeDescription, } from "./arkitPhonemeReference";
|
|
14
|
+
// ============================================================================
|
|
15
|
+
// METAHUMAN FORMAT (251 CTRL_expressions_* blendshapes)
|
|
16
|
+
// ============================================================================
|
|
17
|
+
// MetaHuman 251-Element Order (for MetaHuman Control Rig data)
|
|
18
|
+
export { METAHUMAN_ORDER_251, METAHUMAN_CATEGORIES, KEY_METAHUMAN_LIPSYNC, getMetaHumanBlendshapeName, getMetaHumanBlendshapeIndex, getMetaHumanBlendshapesByCategory, formatMetaHumanBlendshapesForLogging, } from "./metahumanOrder251";
|
|
19
|
+
// Neurosync Blendshape Mapper (Legacy - for compatibility)
|
|
20
|
+
export { NEUROSYNC_BLENDSHAPE_NAMES, mapBlendshapesToNames, formatBlendshapesForLogging, getTopBlendshapes, } from "./neurosyncBlendshapeMapper";
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lipsync-helpers/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,+EAA+E;AAC/E,+DAA+D;AAC/D,+EAA+E;AAE/E,uEAAuE;AACvE,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,wBAAwB,EACxB,iBAAiB,EACjB,6BAA6B,EAC7B,eAAe,EACf,eAAe,EACf,2BAA2B,EAC3B,+BAA+B,EAC/B,uBAAuB,GACxB,MAAM,gBAAgB,CAAC;AAExB,kEAAkE;AAClE,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,0BAA0B,EAC1B,yBAAyB,EACzB,uBAAuB,EACvB,gCAAgC,EAChC,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAElC,iCAAiC;AACjC,OAAO,EACL,8BAA8B,EAC9B,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,GAEtB,MAAM,yBAAyB,CAAC;AAEjC,+EAA+E;AAC/E,wDAAwD;AACxD,+EAA+E;AAE/E,+DAA+D;AAC/D,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,2BAA2B,EAC3B,iCAAiC,EACjC,oCAAoC,GACrC,MAAM,qBAAqB,CAAC;AAE7B,2DAA2D;AAC3D,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,EACrB,2BAA2B,EAC3B,iBAAiB,GAClB,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MetaHuman 251-Element Blendshape Order
|
|
3
|
+
*
|
|
4
|
+
* This is the standard format sent by Convai's MetaHuman blendshape provider.
|
|
5
|
+
* The server sends 251 CTRL_expressions_* values in this specific order.
|
|
6
|
+
*
|
|
7
|
+
* Based on Unreal Engine MetaHuman Control Rig specification.
|
|
8
|
+
*
|
|
9
|
+
* Source: UConvaiNeuroSyncComponent::CtrlExpressionNames[251]
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* MetaHuman 251-element blendshape names (CTRL_expressions_*)
|
|
13
|
+
* This is the order in which blendshapes are received from the server
|
|
14
|
+
*/
|
|
15
|
+
export declare const METAHUMAN_ORDER_251: readonly string[];
|
|
16
|
+
/**
|
|
17
|
+
* Category breakdown for MetaHuman blendshapes
|
|
18
|
+
*/
|
|
19
|
+
export declare const METAHUMAN_CATEGORIES: {
|
|
20
|
+
brows: {
|
|
21
|
+
start: number;
|
|
22
|
+
end: number;
|
|
23
|
+
count: number;
|
|
24
|
+
};
|
|
25
|
+
ears: {
|
|
26
|
+
start: number;
|
|
27
|
+
end: number;
|
|
28
|
+
count: number;
|
|
29
|
+
};
|
|
30
|
+
eyes: {
|
|
31
|
+
start: number;
|
|
32
|
+
end: number;
|
|
33
|
+
count: number;
|
|
34
|
+
};
|
|
35
|
+
eyelashes: {
|
|
36
|
+
start: number;
|
|
37
|
+
end: number;
|
|
38
|
+
count: number;
|
|
39
|
+
};
|
|
40
|
+
jaw: {
|
|
41
|
+
start: number;
|
|
42
|
+
end: number;
|
|
43
|
+
count: number;
|
|
44
|
+
};
|
|
45
|
+
mouth: {
|
|
46
|
+
start: number;
|
|
47
|
+
end: number;
|
|
48
|
+
count: number;
|
|
49
|
+
};
|
|
50
|
+
neck: {
|
|
51
|
+
start: number;
|
|
52
|
+
end: number;
|
|
53
|
+
count: number;
|
|
54
|
+
};
|
|
55
|
+
nose: {
|
|
56
|
+
start: number;
|
|
57
|
+
end: number;
|
|
58
|
+
count: number;
|
|
59
|
+
};
|
|
60
|
+
teeth: {
|
|
61
|
+
start: number;
|
|
62
|
+
end: number;
|
|
63
|
+
count: number;
|
|
64
|
+
};
|
|
65
|
+
tongue: {
|
|
66
|
+
start: number;
|
|
67
|
+
end: number;
|
|
68
|
+
count: number;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Key blendshapes for lip-sync (most important for speech animation)
|
|
73
|
+
*/
|
|
74
|
+
export declare const KEY_METAHUMAN_LIPSYNC: {
|
|
75
|
+
EYE_BLINK_L: number;
|
|
76
|
+
EYE_BLINK_R: number;
|
|
77
|
+
JAW_FORWARD: number;
|
|
78
|
+
JAW_LEFT: number;
|
|
79
|
+
JAW_OPEN: number;
|
|
80
|
+
JAW_RIGHT: number;
|
|
81
|
+
MOUTH_FUNNEL_DL: number;
|
|
82
|
+
MOUTH_FUNNEL_DR: number;
|
|
83
|
+
MOUTH_FUNNEL_UL: number;
|
|
84
|
+
MOUTH_FUNNEL_UR: number;
|
|
85
|
+
MOUTH_LEFT: number;
|
|
86
|
+
MOUTH_RIGHT: number;
|
|
87
|
+
MOUTH_STRETCH_L: number;
|
|
88
|
+
MOUTH_STRETCH_R: number;
|
|
89
|
+
MOUTH_LIPS_TOGETHER_DL: number;
|
|
90
|
+
MOUTH_LIPS_TOGETHER_DR: number;
|
|
91
|
+
MOUTH_LIPS_TOGETHER_UL: number;
|
|
92
|
+
MOUTH_LIPS_TOGETHER_UR: number;
|
|
93
|
+
TONGUE_OUT: number;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Get blendshape name by index
|
|
97
|
+
*/
|
|
98
|
+
export declare function getMetaHumanBlendshapeName(index: number): string | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Get blendshape index by name
|
|
101
|
+
*/
|
|
102
|
+
export declare function getMetaHumanBlendshapeIndex(name: string): number;
|
|
103
|
+
/**
|
|
104
|
+
* Get blendshapes by category
|
|
105
|
+
*/
|
|
106
|
+
export declare function getMetaHumanBlendshapesByCategory(category: keyof typeof METAHUMAN_CATEGORIES): readonly string[];
|
|
107
|
+
/**
|
|
108
|
+
* Format MetaHuman blendshapes for logging
|
|
109
|
+
*/
|
|
110
|
+
export declare function formatMetaHumanBlendshapesForLogging(values: number[] | Float32Array, threshold?: number, maxEntries?: number): {
|
|
111
|
+
active: Record<string, number>;
|
|
112
|
+
total: number;
|
|
113
|
+
activeCount: number;
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=metahumanOrder251.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metahumanOrder251.d.ts","sourceRoot":"","sources":["../../src/lipsync-helpers/metahumanOrder251.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAmSvC,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;CAiCjC,CAAC;AAEF;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE5E;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED;;GAEG;AACH,wBAAgB,iCAAiC,CAAC,QAAQ,EAAE,MAAM,OAAO,oBAAoB,GAAG,SAAS,MAAM,EAAE,CAGhH;AAED;;GAEG;AACH,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,MAAM,EAAE,GAAG,YAAY,EAC/B,SAAS,GAAE,MAAa,EACxB,UAAU,GAAE,MAAW,GACtB;IACD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB,CA4BA"}
|