@convai/web-sdk 0.3.1-beta.3 → 0.3.2-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 -1077
- package/dist/core/AudioManager.d.ts.map +1 -0
- package/dist/core/AudioManager.js +262 -0
- package/dist/core/AudioManager.js.map +1 -0
- 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/{types/core → core}/ConvaiClient.d.ts +19 -15
- package/dist/core/ConvaiClient.d.ts.map +1 -0
- package/dist/core/ConvaiClient.js +623 -0
- package/dist/core/ConvaiClient.js.map +1 -0
- package/dist/core/EventEmitter.d.ts.map +1 -0
- package/dist/core/EventEmitter.js +68 -0
- package/dist/core/EventEmitter.js.map +1 -0
- package/dist/{types/core → core}/MessageHandler.d.ts +7 -0
- package/dist/core/MessageHandler.d.ts.map +1 -0
- package/dist/core/MessageHandler.js +333 -0
- package/dist/core/MessageHandler.js.map +1 -0
- package/dist/core/ScreenShareManager.d.ts.map +1 -0
- package/dist/core/ScreenShareManager.js +207 -0
- package/dist/core/ScreenShareManager.js.map +1 -0
- package/dist/core/VideoManager.d.ts.map +1 -0
- package/dist/core/VideoManager.js +205 -0
- package/dist/core/VideoManager.js.map +1 -0
- package/dist/{types/core → core}/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +14 -1970
- package/dist/core/index.js.map +1 -0
- package/dist/{types/core → core}/types.d.ts +12 -21
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/dev.d.ts +12 -0
- package/dist/dev.d.ts.map +1 -0
- package/dist/dev.js +12 -0
- package/dist/dev.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -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.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.map +1 -0
- package/dist/lipsync-helpers/arkitPhonemeReference.js +362 -0
- package/dist/lipsync-helpers/arkitPhonemeReference.js.map +1 -0
- package/dist/{types/lipsync-helpers → lipsync-helpers}/index.d.ts +1 -0
- package/dist/lipsync-helpers/index.d.ts.map +1 -0
- package/dist/lipsync-helpers/index.js +20 -1165
- 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.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 +68 -0
- package/dist/react/components/ConvaiWidget.d.ts.map +1 -0
- package/dist/react/components/ConvaiWidget.js +505 -0
- package/dist/react/components/ConvaiWidget.js.map +1 -0
- package/dist/react/components/index.d.ts +2 -0
- package/dist/react/components/index.d.ts.map +1 -0
- package/dist/react/components/index.js +3 -0
- package/dist/react/components/index.js.map +1 -0
- package/dist/react/components/rtc-widget/components/AudioSettingsPanel.d.ts +10 -0
- package/dist/react/components/rtc-widget/components/AudioSettingsPanel.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/AudioSettingsPanel.js +316 -0
- package/dist/react/components/rtc-widget/components/AudioSettingsPanel.js.map +1 -0
- package/dist/react/components/rtc-widget/components/AudioVisualizer.d.ts +36 -0
- package/dist/react/components/rtc-widget/components/AudioVisualizer.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/AudioVisualizer.js +259 -0
- package/dist/react/components/rtc-widget/components/AudioVisualizer.js.map +1 -0
- package/dist/react/components/rtc-widget/components/ConviMessage.d.ts +10 -0
- package/dist/react/components/rtc-widget/components/ConviMessage.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/ConviMessage.js +14 -0
- package/dist/react/components/rtc-widget/components/ConviMessage.js.map +1 -0
- package/dist/react/components/rtc-widget/components/FloatingVideo.d.ts +9 -0
- package/dist/react/components/rtc-widget/components/FloatingVideo.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/FloatingVideo.js +122 -0
- package/dist/react/components/rtc-widget/components/FloatingVideo.js.map +1 -0
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts +7 -0
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.js +68 -0
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.js.map +1 -0
- package/dist/react/components/rtc-widget/components/MessageBubble.d.ts +10 -0
- package/dist/react/components/rtc-widget/components/MessageBubble.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/MessageBubble.js +23 -0
- package/dist/react/components/rtc-widget/components/MessageBubble.js.map +1 -0
- package/dist/react/components/rtc-widget/components/MessageList.d.ts +11 -0
- package/dist/react/components/rtc-widget/components/MessageList.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/MessageList.js +89 -0
- package/dist/react/components/rtc-widget/components/MessageList.js.map +1 -0
- package/dist/react/components/rtc-widget/components/UserMessage.d.ts +9 -0
- package/dist/react/components/rtc-widget/components/UserMessage.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/UserMessage.js +15 -0
- package/dist/react/components/rtc-widget/components/UserMessage.js.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.d.ts +6 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.js +15 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.js.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.d.ts +25 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.js +172 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.js.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.d.ts +17 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.js +66 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.js.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts +12 -0
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js +68 -0
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.d.ts +12 -0
- package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js +255 -0
- package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/index.d.ts +6 -0
- package/dist/react/components/rtc-widget/components/conviComponents/index.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/index.js +6 -0
- package/dist/react/components/rtc-widget/components/conviComponents/index.js.map +1 -0
- package/dist/react/components/rtc-widget/components/index.d.ts +9 -0
- package/dist/react/components/rtc-widget/components/index.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/index.js +15 -0
- package/dist/react/components/rtc-widget/components/index.js.map +1 -0
- package/dist/react/components/rtc-widget/index.d.ts +6 -0
- package/dist/react/components/rtc-widget/index.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/index.js +9 -0
- package/dist/react/components/rtc-widget/index.js.map +1 -0
- package/dist/react/components/rtc-widget/styles/framerConfig.d.ts +116 -0
- package/dist/react/components/rtc-widget/styles/framerConfig.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/styles/framerConfig.js +73 -0
- package/dist/react/components/rtc-widget/styles/framerConfig.js.map +1 -0
- package/dist/react/components/rtc-widget/styles/icons.d.ts +28 -0
- package/dist/react/components/rtc-widget/styles/icons.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/styles/icons.js +257 -0
- package/dist/react/components/rtc-widget/styles/icons.js.map +1 -0
- package/dist/react/components/rtc-widget/styles/index.d.ts +6 -0
- package/dist/react/components/rtc-widget/styles/index.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/styles/index.js +9 -0
- package/dist/react/components/rtc-widget/styles/index.js.map +1 -0
- package/dist/react/components/rtc-widget/styles/styledComponents.d.ts +90 -0
- package/dist/react/components/rtc-widget/styles/styledComponents.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/styles/styledComponents.js +663 -0
- package/dist/react/components/rtc-widget/styles/styledComponents.js.map +1 -0
- package/dist/react/components/rtc-widget/styles/theme.d.ts +188 -0
- package/dist/react/components/rtc-widget/styles/theme.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/styles/theme.js +290 -0
- package/dist/react/components/rtc-widget/styles/theme.js.map +1 -0
- package/dist/react/components/rtc-widget/types/index.d.ts +60 -0
- package/dist/react/components/rtc-widget/types/index.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/types/index.js +2 -0
- package/dist/react/components/rtc-widget/types/index.js.map +1 -0
- package/dist/react/hooks/index.d.ts +4 -0
- package/dist/react/hooks/index.d.ts.map +1 -0
- package/dist/react/hooks/index.js +6 -0
- package/dist/react/hooks/index.js.map +1 -0
- package/dist/react/hooks/useCharacterInfo.d.ts +17 -0
- package/dist/react/hooks/useCharacterInfo.d.ts.map +1 -0
- package/dist/react/hooks/useCharacterInfo.js +60 -0
- package/dist/react/hooks/useCharacterInfo.js.map +1 -0
- package/dist/react/hooks/useConvaiClient.d.ts +35 -0
- package/dist/react/hooks/useConvaiClient.d.ts.map +1 -0
- package/dist/react/hooks/useConvaiClient.js +183 -0
- package/dist/react/hooks/useConvaiClient.js.map +1 -0
- package/dist/react/hooks/useLocalCameraTrack.d.ts +22 -0
- package/dist/react/hooks/useLocalCameraTrack.d.ts.map +1 -0
- package/dist/react/hooks/useLocalCameraTrack.js +34 -0
- package/dist/react/hooks/useLocalCameraTrack.js.map +1 -0
- package/dist/react/index.d.ts +7 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +13 -0
- package/dist/react/index.js.map +1 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/LatencyMonitor.d.ts.map +1 -0
- package/dist/utils/LatencyMonitor.js +136 -0
- package/dist/utils/LatencyMonitor.js.map +1 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +96 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/speakerManagement.d.ts.map +1 -0
- package/dist/utils/speakerManagement.js +64 -0
- package/dist/utils/speakerManagement.js.map +1 -0
- package/dist/{types/vanilla → vanilla}/AudioRenderer.d.ts +5 -0
- package/dist/vanilla/AudioRenderer.d.ts.map +1 -0
- package/dist/vanilla/AudioRenderer.js +135 -0
- package/dist/vanilla/AudioRenderer.js.map +1 -0
- package/dist/vanilla/ConvaiWidget.d.ts.map +1 -0
- package/dist/vanilla/ConvaiWidget.js +1786 -0
- package/dist/vanilla/ConvaiWidget.js.map +1 -0
- package/dist/vanilla/icons.d.ts.map +1 -0
- package/dist/vanilla/icons.js +222 -0
- package/dist/vanilla/icons.js.map +1 -0
- package/dist/{types/vanilla → vanilla}/index.d.ts +1 -3
- package/dist/vanilla/index.d.ts.map +1 -0
- package/dist/vanilla/index.js +20 -5509
- package/dist/vanilla/index.js.map +1 -0
- package/dist/vanilla/styles.d.ts.map +1 -0
- package/dist/vanilla/styles.js +287 -0
- package/dist/vanilla/styles.js.map +1 -0
- package/dist/vanilla/types.d.ts +43 -0
- package/dist/vanilla/types.d.ts.map +1 -0
- package/dist/vanilla/types.js +2 -0
- package/dist/vanilla/types.js.map +1 -0
- package/package.json +33 -38
- package/CHANGELOG.md +0 -165
- package/dist/core/index.cjs +0 -1977
- package/dist/lipsync-helpers/index.cjs +0 -1195
- package/dist/types/core/AudioManager.d.ts.map +0 -1
- package/dist/types/core/ConvaiClient.d.ts.map +0 -1
- package/dist/types/core/EventEmitter.d.ts.map +0 -1
- package/dist/types/core/MessageHandler.d.ts.map +0 -1
- package/dist/types/core/ScreenShareManager.d.ts.map +0 -1
- package/dist/types/core/VideoManager.d.ts.map +0 -1
- package/dist/types/core/index.d.ts.map +0 -1
- package/dist/types/core/types.d.ts.map +0 -1
- package/dist/types/lipsync-helpers/arkitBlendshapeHelpers.d.ts.map +0 -1
- package/dist/types/lipsync-helpers/arkitOrder61.d.ts.map +0 -1
- package/dist/types/lipsync-helpers/arkitPhonemeReference.d.ts.map +0 -1
- package/dist/types/lipsync-helpers/index.d.ts.map +0 -1
- package/dist/types/lipsync-helpers/neurosyncBlendshapeMapper.d.ts.map +0 -1
- package/dist/types/types/index.d.ts.map +0 -1
- package/dist/types/utils/LatencyMonitor.d.ts.map +0 -1
- package/dist/types/utils/logger.d.ts.map +0 -1
- package/dist/types/utils/speakerManagement.d.ts.map +0 -1
- package/dist/types/vanilla/AudioRenderer.d.ts.map +0 -1
- package/dist/types/vanilla/ConvaiWidget.d.ts.map +0 -1
- package/dist/types/vanilla/icons.d.ts.map +0 -1
- package/dist/types/vanilla/index.d.ts.map +0 -1
- package/dist/types/vanilla/styles.d.ts.map +0 -1
- package/dist/types/vanilla/types.d.ts +0 -106
- package/dist/types/vanilla/types.d.ts.map +0 -1
- package/dist/umd/convai.umd.js +0 -1
- package/dist/vanilla/index.cjs +0 -5559
- /package/dist/{types/core → core}/AudioManager.d.ts +0 -0
- /package/dist/{types/core → core}/EventEmitter.d.ts +0 -0
- /package/dist/{types/core → core}/ScreenShareManager.d.ts +0 -0
- /package/dist/{types/core → core}/VideoManager.d.ts +0 -0
- /package/dist/{types/lipsync-helpers → lipsync-helpers}/arkitBlendshapeHelpers.d.ts +0 -0
- /package/dist/{types/lipsync-helpers → lipsync-helpers}/arkitOrder61.d.ts +0 -0
- /package/dist/{types/lipsync-helpers → lipsync-helpers}/arkitPhonemeReference.d.ts +0 -0
- /package/dist/{types/lipsync-helpers → lipsync-helpers}/neurosyncBlendshapeMapper.d.ts +0 -0
- /package/dist/types/{types/index.d.ts → index.d.ts} +0 -0
- /package/dist/{types/utils → utils}/LatencyMonitor.d.ts +0 -0
- /package/dist/{types/utils → utils}/logger.d.ts +0 -0
- /package/dist/{types/utils → utils}/speakerManagement.d.ts +0 -0
- /package/dist/{types/vanilla → vanilla}/ConvaiWidget.d.ts +0 -0
- /package/dist/{types/vanilla → vanilla}/icons.d.ts +0 -0
- /package/dist/{types/vanilla → vanilla}/styles.d.ts +0 -0
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Neurosync Meta Human Blendshape Mapper
|
|
3
|
+
* Maps 251 blendshape indices to their corresponding names
|
|
4
|
+
* Based on Neurosync Meta Human specification
|
|
5
|
+
*/
|
|
6
|
+
export const NEUROSYNC_BLENDSHAPE_NAMES = [
|
|
7
|
+
// 0-51: ARKit Standard Blendshapes
|
|
8
|
+
"browDownLeft", // 0
|
|
9
|
+
"browDownRight", // 1
|
|
10
|
+
"browInnerUp", // 2
|
|
11
|
+
"browOuterUpLeft", // 3
|
|
12
|
+
"browOuterUpRight", // 4
|
|
13
|
+
"cheekPuff", // 5
|
|
14
|
+
"cheekSquintLeft", // 6
|
|
15
|
+
"cheekSquintRight", // 7
|
|
16
|
+
"eyeBlinkLeft", // 8
|
|
17
|
+
"eyeBlinkRight", // 9
|
|
18
|
+
"eyeLookDownLeft", // 10
|
|
19
|
+
"eyeLookDownRight", // 11
|
|
20
|
+
"eyeLookInLeft", // 12
|
|
21
|
+
"eyeLookInRight", // 13
|
|
22
|
+
"eyeLookOutLeft", // 14
|
|
23
|
+
"eyeLookOutRight", // 15
|
|
24
|
+
"eyeLookUpLeft", // 16
|
|
25
|
+
"eyeLookUpRight", // 17
|
|
26
|
+
"eyeSquintLeft", // 18
|
|
27
|
+
"eyeSquintRight", // 19
|
|
28
|
+
"eyeWideLeft", // 20
|
|
29
|
+
"eyeWideRight", // 21
|
|
30
|
+
"jawForward", // 22
|
|
31
|
+
"jawLeft", // 23
|
|
32
|
+
"jawOpen", // 24
|
|
33
|
+
"jawRight", // 25
|
|
34
|
+
"mouthClose", // 26
|
|
35
|
+
"mouthDimpleLeft", // 27
|
|
36
|
+
"mouthDimpleRight", // 28
|
|
37
|
+
"mouthFrownLeft", // 29
|
|
38
|
+
"mouthFrownRight", // 30
|
|
39
|
+
"mouthFunnel", // 31
|
|
40
|
+
"mouthLeft", // 32
|
|
41
|
+
"mouthLowerDownLeft", // 33
|
|
42
|
+
"mouthLowerDownRight", // 34
|
|
43
|
+
"mouthPressLeft", // 35
|
|
44
|
+
"mouthPressRight", // 36
|
|
45
|
+
"mouthPucker", // 37
|
|
46
|
+
"mouthRight", // 38
|
|
47
|
+
"mouthRollLower", // 39
|
|
48
|
+
"mouthRollUpper", // 40
|
|
49
|
+
"mouthShrugLower", // 41
|
|
50
|
+
"mouthShrugUpper", // 42
|
|
51
|
+
"mouthSmileLeft", // 43
|
|
52
|
+
"mouthSmileRight", // 44
|
|
53
|
+
"mouthStretchLeft", // 45
|
|
54
|
+
"mouthStretchRight", // 46
|
|
55
|
+
"mouthUpperUpLeft", // 47
|
|
56
|
+
"mouthUpperUpRight", // 48
|
|
57
|
+
"noseSneerLeft", // 49
|
|
58
|
+
"noseSneerRight", // 50
|
|
59
|
+
"tongueOut", // 51
|
|
60
|
+
// 52-250: Meta Human Extended Blendshapes
|
|
61
|
+
"head_forward", // 52
|
|
62
|
+
"head_upDown", // 53
|
|
63
|
+
"head_tilt", // 54
|
|
64
|
+
"head_turn", // 55
|
|
65
|
+
"neck_stretch", // 56
|
|
66
|
+
"neck_tilt", // 57
|
|
67
|
+
"eyebrow_raiseInner_L", // 58
|
|
68
|
+
"eyebrow_raiseInner_R", // 59
|
|
69
|
+
"eyebrow_raiseOuter_L", // 60
|
|
70
|
+
"eyebrow_raiseOuter_R", // 61
|
|
71
|
+
"eyebrow_down_L", // 62
|
|
72
|
+
"eyebrow_down_R", // 63
|
|
73
|
+
"eye_blink_L", // 64
|
|
74
|
+
"eye_blink_R", // 65
|
|
75
|
+
"eye_wide_L", // 66
|
|
76
|
+
"eye_wide_R", // 67
|
|
77
|
+
"eye_squint_L", // 68
|
|
78
|
+
"eye_squint_R", // 69
|
|
79
|
+
"eye_look_up_L", // 70
|
|
80
|
+
"eye_look_up_R", // 71
|
|
81
|
+
"eye_look_down_L", // 72
|
|
82
|
+
"eye_look_down_R", // 73
|
|
83
|
+
"eye_look_in_L", // 74
|
|
84
|
+
"eye_look_in_R", // 75
|
|
85
|
+
"eye_look_out_L", // 76
|
|
86
|
+
"eye_look_out_R", // 77
|
|
87
|
+
"pupil_dilate_L", // 78
|
|
88
|
+
"pupil_dilate_R", // 79
|
|
89
|
+
"cheek_puff_L", // 80
|
|
90
|
+
"cheek_puff_R", // 81
|
|
91
|
+
"cheek_squint_L", // 82
|
|
92
|
+
"cheek_squint_R", // 83
|
|
93
|
+
"cheek_raiser_L", // 84
|
|
94
|
+
"cheek_raiser_R", // 85
|
|
95
|
+
"nose_wrinkle_L", // 86
|
|
96
|
+
"nose_wrinkle_R", // 87
|
|
97
|
+
"nose_nostril_raise_L", // 88
|
|
98
|
+
"nose_nostril_raise_R", // 89
|
|
99
|
+
"nose_nostril_compress_L", // 90
|
|
100
|
+
"nose_nostril_compress_R", // 91
|
|
101
|
+
"nose_nostril_dilate_L", // 92
|
|
102
|
+
"nose_nostril_dilate_R", // 93
|
|
103
|
+
"lip_upper_raise_L", // 94
|
|
104
|
+
"lip_upper_raise_R", // 95
|
|
105
|
+
"lip_upper_raiseInner_L", // 96
|
|
106
|
+
"lip_upper_raiseInner_R", // 97
|
|
107
|
+
"lip_upper_close", // 98
|
|
108
|
+
"lip_lower_close", // 99
|
|
109
|
+
"lip_lower_down_L", // 100
|
|
110
|
+
"lip_lower_down_R", // 101
|
|
111
|
+
"lip_lower_downInner_L", // 102
|
|
112
|
+
"lip_lower_downInner_R", // 103
|
|
113
|
+
"lip_corner_puller_L", // 104
|
|
114
|
+
"lip_corner_puller_R", // 105
|
|
115
|
+
"lip_corner_depressor_L", // 106
|
|
116
|
+
"lip_corner_depressor_R", // 107
|
|
117
|
+
"lip_stretcher_L", // 108
|
|
118
|
+
"lip_stretcher_R", // 109
|
|
119
|
+
"lip_funneler_LT", // 110
|
|
120
|
+
"lip_funneler_RT", // 111
|
|
121
|
+
"lip_funneler_LB", // 112
|
|
122
|
+
"lip_funneler_RB", // 113
|
|
123
|
+
"lip_pucker_L", // 114
|
|
124
|
+
"lip_pucker_R", // 115
|
|
125
|
+
"lip_press_L", // 116
|
|
126
|
+
"lip_press_R", // 117
|
|
127
|
+
"lip_tightener_L", // 118
|
|
128
|
+
"lip_tightener_R", // 119
|
|
129
|
+
"lip_suck_LT", // 120
|
|
130
|
+
"lip_suck_RT", // 121
|
|
131
|
+
"lip_suck_LB", // 122
|
|
132
|
+
"lip_suck_RB", // 123
|
|
133
|
+
"mouth_left", // 124
|
|
134
|
+
"mouth_right", // 125
|
|
135
|
+
"mouth_smile_L", // 126
|
|
136
|
+
"mouth_smile_R", // 127
|
|
137
|
+
"mouth_frown_L", // 128
|
|
138
|
+
"mouth_frown_R", // 129
|
|
139
|
+
"mouth_dimpler_L", // 130
|
|
140
|
+
"mouth_dimpler_R", // 131
|
|
141
|
+
"mouth_stretch_L", // 132
|
|
142
|
+
"mouth_stretch_R", // 133
|
|
143
|
+
"mouth_shrug_upper", // 134
|
|
144
|
+
"mouth_shrug_lower", // 135
|
|
145
|
+
"mouth_roll_upper_L", // 136
|
|
146
|
+
"mouth_roll_upper_R", // 137
|
|
147
|
+
"mouth_roll_lower_L", // 138
|
|
148
|
+
"mouth_roll_lower_R", // 139
|
|
149
|
+
"jaw_open", // 140
|
|
150
|
+
"jaw_forward", // 141
|
|
151
|
+
"jaw_left", // 142
|
|
152
|
+
"jaw_right", // 143
|
|
153
|
+
"jaw_clench", // 144
|
|
154
|
+
"jaw_thrust", // 145
|
|
155
|
+
"tongue_out", // 146
|
|
156
|
+
"tongue_up", // 147
|
|
157
|
+
"tongue_down", // 148
|
|
158
|
+
"tongue_wide", // 149
|
|
159
|
+
"tongue_narrow", // 150
|
|
160
|
+
"tongue_curl_up", // 151
|
|
161
|
+
"tongue_roll", // 152
|
|
162
|
+
"tongue_bulge_L", // 153
|
|
163
|
+
"tongue_bulge_R", // 154
|
|
164
|
+
"tongue_press", // 155
|
|
165
|
+
"midLipLowerDown_L", // 156
|
|
166
|
+
"midLipLowerDown_R", // 157
|
|
167
|
+
"midLipUpperUp_L", // 158
|
|
168
|
+
"midLipUpperUp_R", // 159
|
|
169
|
+
"midNostrilSharpener_L", // 160
|
|
170
|
+
"midNostrilSharpener_R", // 161
|
|
171
|
+
"viseme_sil", // 162
|
|
172
|
+
"viseme_PP", // 163
|
|
173
|
+
"viseme_FF", // 164
|
|
174
|
+
"viseme_TH", // 165
|
|
175
|
+
"viseme_DD", // 166
|
|
176
|
+
"viseme_kk", // 167
|
|
177
|
+
"viseme_CH", // 168
|
|
178
|
+
"viseme_SS", // 169
|
|
179
|
+
"viseme_nn", // 170
|
|
180
|
+
"viseme_RR", // 171
|
|
181
|
+
"viseme_aa", // 172
|
|
182
|
+
"viseme_E", // 173
|
|
183
|
+
"viseme_I", // 174
|
|
184
|
+
"viseme_O", // 175
|
|
185
|
+
"viseme_U", // 176
|
|
186
|
+
"lid_tightener_L", // 177
|
|
187
|
+
"lid_tightener_R", // 178
|
|
188
|
+
"eyelid_upper_raise_L", // 179
|
|
189
|
+
"eyelid_upper_raise_R", // 180
|
|
190
|
+
"eyelid_lower_down_L", // 181
|
|
191
|
+
"eyelid_lower_down_R", // 182
|
|
192
|
+
"eye_parallel_look_down", // 183
|
|
193
|
+
"eye_parallel_look_up", // 184
|
|
194
|
+
"innerBrow_raiser_L", // 185
|
|
195
|
+
"innerBrow_raiser_R", // 186
|
|
196
|
+
"outerBrow_raiser_L", // 187
|
|
197
|
+
"outerBrow_raiser_R", // 188
|
|
198
|
+
"lipCorner_down_L", // 189
|
|
199
|
+
"lipCorner_down_R", // 190
|
|
200
|
+
"lipCorner_wide_L", // 191
|
|
201
|
+
"lipCorner_wide_R", // 192
|
|
202
|
+
"lipLower_down_L", // 193
|
|
203
|
+
"lipLower_down_R", // 194
|
|
204
|
+
"lipUpper_up_L", // 195
|
|
205
|
+
"lipUpper_up_R", // 196
|
|
206
|
+
"wrinkler", // 197
|
|
207
|
+
"chin_raiser", // 198
|
|
208
|
+
"chin_raiser_T", // 199
|
|
209
|
+
"chin_raiser_B", // 200
|
|
210
|
+
"lips_toward", // 201
|
|
211
|
+
"lips_blow", // 202
|
|
212
|
+
"puff_suck_lower", // 203
|
|
213
|
+
"puff_suck_upper", // 204
|
|
214
|
+
"puff_suck_upper_L", // 205
|
|
215
|
+
"puff_suck_upper_R", // 206
|
|
216
|
+
"puff_suck_lower_L", // 207
|
|
217
|
+
"puff_suck_lower_R", // 208
|
|
218
|
+
"phone_aa", // 209
|
|
219
|
+
"phone_ow", // 210
|
|
220
|
+
"phone_ee", // 211
|
|
221
|
+
"phone_er", // 212
|
|
222
|
+
"phone_uw", // 213
|
|
223
|
+
"phone_l", // 214
|
|
224
|
+
"phone_w", // 215
|
|
225
|
+
"phone_m", // 216
|
|
226
|
+
"phone_f", // 217
|
|
227
|
+
"phone_th", // 218
|
|
228
|
+
"phone_s", // 219
|
|
229
|
+
"phone_sh", // 220
|
|
230
|
+
"phone_t", // 221
|
|
231
|
+
"phone_k", // 222
|
|
232
|
+
"phone_b", // 223
|
|
233
|
+
"phone_d", // 224
|
|
234
|
+
"phone_g", // 225
|
|
235
|
+
"phone_n", // 226
|
|
236
|
+
"phone_r", // 227
|
|
237
|
+
"phone_y", // 228
|
|
238
|
+
"expression_neutral", // 229
|
|
239
|
+
"expression_happy", // 230
|
|
240
|
+
"expression_sad", // 231
|
|
241
|
+
"expression_angry", // 232
|
|
242
|
+
"expression_surprised", // 233
|
|
243
|
+
"expression_disgusted", // 234
|
|
244
|
+
"expression_afraid", // 235
|
|
245
|
+
"expression_contempt", // 236
|
|
246
|
+
"occlusion_upper", // 237
|
|
247
|
+
"occlusion_lower", // 238
|
|
248
|
+
"teeth_upper", // 239
|
|
249
|
+
"teeth_lower", // 240
|
|
250
|
+
"teeth_fwdBack_upper", // 241
|
|
251
|
+
"teeth_fwdBack_lower", // 242
|
|
252
|
+
"teeth_width_upper", // 243
|
|
253
|
+
"teeth_width_lower", // 244
|
|
254
|
+
"gums_upper", // 245
|
|
255
|
+
"gums_lower", // 246
|
|
256
|
+
"tongue_tip", // 247
|
|
257
|
+
"tongue_thickness", // 248
|
|
258
|
+
"soft_palate", // 249
|
|
259
|
+
"emotion_intensity", // 250
|
|
260
|
+
];
|
|
261
|
+
/**
|
|
262
|
+
* Maps blendshape values to their names
|
|
263
|
+
*/
|
|
264
|
+
export function mapBlendshapesToNames(values) {
|
|
265
|
+
const mapped = {};
|
|
266
|
+
values.forEach((value, index) => {
|
|
267
|
+
if (index < NEUROSYNC_BLENDSHAPE_NAMES.length) {
|
|
268
|
+
const name = NEUROSYNC_BLENDSHAPE_NAMES[index];
|
|
269
|
+
mapped[name] = value;
|
|
270
|
+
}
|
|
271
|
+
else {
|
|
272
|
+
// Handle any indices beyond our known names
|
|
273
|
+
mapped[`unknown_${index}`] = value;
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
return mapped;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Formats blendshapes for logging with filtering
|
|
280
|
+
* @param values - Array of 251 blendshape values
|
|
281
|
+
* @param threshold - Only log values above this threshold (default: 0.01)
|
|
282
|
+
* @param maxEntries - Maximum number of entries to log (default: 20)
|
|
283
|
+
*/
|
|
284
|
+
export function formatBlendshapesForLogging(values, threshold = 0.01, maxEntries = 20) {
|
|
285
|
+
const mapped = mapBlendshapesToNames(values);
|
|
286
|
+
// Filter values above threshold and sort by value (descending)
|
|
287
|
+
const activeBlendshapes = Object.entries(mapped)
|
|
288
|
+
.filter(([_, value]) => Math.abs(value) > threshold)
|
|
289
|
+
.sort(([, a], [, b]) => Math.abs(b) - Math.abs(a))
|
|
290
|
+
.slice(0, maxEntries)
|
|
291
|
+
.reduce((acc, [name, value]) => {
|
|
292
|
+
acc[name] = Number(value.toFixed(4));
|
|
293
|
+
return acc;
|
|
294
|
+
}, {});
|
|
295
|
+
return {
|
|
296
|
+
active: activeBlendshapes,
|
|
297
|
+
total: values.length,
|
|
298
|
+
activeCount: Object.keys(activeBlendshapes).length,
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Gets the most significant blendshapes
|
|
303
|
+
*/
|
|
304
|
+
export function getTopBlendshapes(values, count = 10) {
|
|
305
|
+
return values
|
|
306
|
+
.map((value, index) => ({
|
|
307
|
+
name: NEUROSYNC_BLENDSHAPE_NAMES[index] || `unknown_${index}`,
|
|
308
|
+
value,
|
|
309
|
+
index,
|
|
310
|
+
}))
|
|
311
|
+
.filter((item) => Math.abs(item.value) > 0.001)
|
|
312
|
+
.sort((a, b) => Math.abs(b.value) - Math.abs(a.value))
|
|
313
|
+
.slice(0, count);
|
|
314
|
+
}
|
|
315
|
+
//# sourceMappingURL=neurosyncBlendshapeMapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neurosyncBlendshapeMapper.js","sourceRoot":"","sources":["../../src/lipsync-helpers/neurosyncBlendshapeMapper.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAa;IAClD,mCAAmC;IACnC,cAAc,EAAe,IAAI;IACjC,eAAe,EAAc,IAAI;IACjC,aAAa,EAAgB,IAAI;IACjC,iBAAiB,EAAY,IAAI;IACjC,kBAAkB,EAAW,IAAI;IACjC,WAAW,EAAkB,IAAI;IACjC,iBAAiB,EAAY,IAAI;IACjC,kBAAkB,EAAW,IAAI;IACjC,cAAc,EAAe,IAAI;IACjC,eAAe,EAAc,IAAI;IACjC,iBAAiB,EAAY,KAAK;IAClC,kBAAkB,EAAW,KAAK;IAClC,eAAe,EAAc,KAAK;IAClC,gBAAgB,EAAa,KAAK;IAClC,gBAAgB,EAAa,KAAK;IAClC,iBAAiB,EAAY,KAAK;IAClC,eAAe,EAAc,KAAK;IAClC,gBAAgB,EAAa,KAAK;IAClC,eAAe,EAAc,KAAK;IAClC,gBAAgB,EAAa,KAAK;IAClC,aAAa,EAAgB,KAAK;IAClC,cAAc,EAAe,KAAK;IAClC,YAAY,EAAiB,KAAK;IAClC,SAAS,EAAoB,KAAK;IAClC,SAAS,EAAoB,KAAK;IAClC,UAAU,EAAmB,KAAK;IAClC,YAAY,EAAiB,KAAK;IAClC,iBAAiB,EAAY,KAAK;IAClC,kBAAkB,EAAW,KAAK;IAClC,gBAAgB,EAAa,KAAK;IAClC,iBAAiB,EAAY,KAAK;IAClC,aAAa,EAAgB,KAAK;IAClC,WAAW,EAAkB,KAAK;IAClC,oBAAoB,EAAS,KAAK;IAClC,qBAAqB,EAAQ,KAAK;IAClC,gBAAgB,EAAa,KAAK;IAClC,iBAAiB,EAAY,KAAK;IAClC,aAAa,EAAgB,KAAK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I,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;SACrD,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { IConvaiClient } from "../../core/types";
|
|
2
|
+
interface ConvaiWidgetProps {
|
|
3
|
+
/** Convai client instance (required) */
|
|
4
|
+
convaiClient: IConvaiClient & {
|
|
5
|
+
activity?: string;
|
|
6
|
+
isAudioMuted: boolean;
|
|
7
|
+
isVideoEnabled: boolean;
|
|
8
|
+
isScreenShareActive: boolean;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Show video toggle button in settings (default: true).
|
|
12
|
+
* Only works if connection type is "video". If false, hides the video button.
|
|
13
|
+
*/
|
|
14
|
+
showVideo?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Show screen share toggle button in settings (default: true).
|
|
17
|
+
* Only works if connection type is "video". If false, hides the screen share button.
|
|
18
|
+
*/
|
|
19
|
+
showScreenShare?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Start in voice mode by default when widget opens (default: true).
|
|
22
|
+
* When true, the widget will open directly in voice mode with microphone enabled.
|
|
23
|
+
*/
|
|
24
|
+
defaultVoiceMode?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* ConvaiWidget - A consolidated chat widget component for real-time conversations
|
|
28
|
+
*
|
|
29
|
+
* This component provides a complete UI for interacting with Convai characters.
|
|
30
|
+
* Connection configuration should be handled via useConvaiClient.connect().
|
|
31
|
+
*
|
|
32
|
+
* Features:
|
|
33
|
+
* - Collapsed circular button with status indicator
|
|
34
|
+
* - Expandable/collapsible chat interface
|
|
35
|
+
* - Voice mode support
|
|
36
|
+
* - Real-time message streaming
|
|
37
|
+
* - Audio controls (mute/unmute)
|
|
38
|
+
* - Settings tray with session reset
|
|
39
|
+
* - Optional video and screen share (when connection type supports it)
|
|
40
|
+
*
|
|
41
|
+
* @param {ConvaiWidgetProps} props - Component props
|
|
42
|
+
* @param {ConvaiClient} props.convaiClient - Convai client instance (required)
|
|
43
|
+
* @param {boolean} props.showVideo - Show video toggle in settings (default: true)
|
|
44
|
+
* @param {boolean} props.showScreenShare - Show screen share toggle in settings (default: true)
|
|
45
|
+
* @param {boolean} props.defaultVoiceMode - Start in voice mode when widget opens (default: true)
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* function App() {
|
|
50
|
+
* const convaiClient = useConvaiClient({
|
|
51
|
+
* apiKey: 'your-api-key',
|
|
52
|
+
* characterId: 'your-character-id',
|
|
53
|
+
* enableVideo: true,
|
|
54
|
+
* });
|
|
55
|
+
*
|
|
56
|
+
* return (
|
|
57
|
+
* <ConvaiWidget
|
|
58
|
+
* convaiClient={convaiClient}
|
|
59
|
+
* showVideo={true}
|
|
60
|
+
* showScreenShare={true}
|
|
61
|
+
* />
|
|
62
|
+
* );
|
|
63
|
+
* }
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
export declare const ConvaiWidget: React.FC<ConvaiWidgetProps>;
|
|
67
|
+
export {};
|
|
68
|
+
//# sourceMappingURL=ConvaiWidget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConvaiWidget.d.ts","sourceRoot":"","sources":["../../../src/react/components/ConvaiWidget.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AA0CtD,UAAU,iBAAiB;IACzB,wCAAwC;IACxC,YAAY,EAAE,aAAa,GAAG;QAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,YAAY,EAAE,OAAO,CAAC;QACtB,cAAc,EAAE,OAAO,CAAC;QACxB,mBAAmB,EAAE,OAAO,CAAC;KAC9B,CAAC;IACF;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAixBpD,CAAC"}
|