@memori.ai/memori-react 7.7.1 → 7.8.0-rc.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/CHANGELOG.md +22 -0
- package/dist/components/Avatar/Avatar.js +2 -2
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/AvatarView/AvatarComponent/avatarComponent.d.ts +6 -3
- package/dist/components/Avatar/AvatarView/AvatarComponent/avatarComponent.js +10 -6
- package/dist/components/Avatar/AvatarView/AvatarComponent/avatarComponent.js.map +1 -1
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.d.ts +13 -17
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.js +110 -111
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.js.map +1 -1
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.d.ts +3 -4
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.js +77 -52
- package/dist/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.js.map +1 -1
- package/dist/components/Avatar/AvatarView/index.d.ts +7 -3
- package/dist/components/Avatar/AvatarView/index.js +2 -2
- package/dist/components/Avatar/AvatarView/index.js.map +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.js +34 -22
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/layouts/ZoomedFullBody.js +1 -8
- package/dist/components/layouts/ZoomedFullBody.js.map +1 -1
- package/dist/components/layouts/zoomed-full-body.css +5 -1
- package/dist/context/visemeContext.d.ts +9 -15
- package/dist/context/visemeContext.js +73 -190
- package/dist/context/visemeContext.js.map +1 -1
- package/esm/components/Avatar/Avatar.js +2 -2
- package/esm/components/Avatar/Avatar.js.map +1 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/avatarComponent.d.ts +6 -3
- package/esm/components/Avatar/AvatarView/AvatarComponent/avatarComponent.js +10 -6
- package/esm/components/Avatar/AvatarView/AvatarComponent/avatarComponent.js.map +1 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.d.ts +13 -17
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.js +112 -113
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.js.map +1 -1
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.d.ts +3 -4
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.js +81 -55
- package/esm/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.js.map +1 -1
- package/esm/components/Avatar/AvatarView/index.d.ts +7 -3
- package/esm/components/Avatar/AvatarView/index.js +2 -2
- package/esm/components/Avatar/AvatarView/index.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.js +34 -22
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/layouts/ZoomedFullBody.js +1 -8
- package/esm/components/layouts/ZoomedFullBody.js.map +1 -1
- package/esm/components/layouts/zoomed-full-body.css +5 -1
- package/esm/context/visemeContext.d.ts +9 -15
- package/esm/context/visemeContext.js +74 -191
- package/esm/context/visemeContext.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Avatar/Avatar.tsx +5 -5
- package/src/components/Avatar/AvatarView/AvatarComponent/avatarComponent.tsx +33 -19
- package/src/components/Avatar/AvatarView/AvatarComponent/components/fullbodyAvatar.tsx +181 -158
- package/src/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.tsx +116 -71
- package/src/components/Avatar/AvatarView/AvatarView.stories.tsx +12 -24
- package/src/components/Avatar/AvatarView/index.tsx +9 -8
- package/src/components/MemoriWidget/MemoriWidget.tsx +45 -38
- package/src/components/layouts/ZoomedFullBody.tsx +6 -11
- package/src/components/layouts/zoomed-full-body.css +5 -1
- package/src/context/visemeContext.tsx +130 -283
- package/dist/components/AttachmentMediaModal/AttachmentMediaModal.d.ts +0 -14
- package/dist/components/AttachmentMediaModal/AttachmentMediaModal.js +0 -66
- package/dist/components/AttachmentMediaModal/AttachmentMediaModal.js.map +0 -1
- package/dist/components/Avatar/AvatarView/components/controls.d.ts +0 -23
- package/dist/components/Avatar/AvatarView/components/controls.js +0 -55
- package/dist/components/Avatar/AvatarView/components/controls.js.map +0 -1
- package/dist/components/Avatar/AvatarView/components/fullbodyAvatar.d.ts +0 -19
- package/dist/components/Avatar/AvatarView/components/fullbodyAvatar.js +0 -61
- package/dist/components/Avatar/AvatarView/components/fullbodyAvatar.js.map +0 -1
- package/dist/components/Avatar/AvatarView/components/halfbodyAvatar.d.ts +0 -9
- package/dist/components/Avatar/AvatarView/components/halfbodyAvatar.js +0 -39
- package/dist/components/Avatar/AvatarView/components/halfbodyAvatar.js.map +0 -1
- package/dist/components/Avatar/AvatarView/components/loader.d.ts +0 -5
- package/dist/components/Avatar/AvatarView/components/loader.js +0 -12
- package/dist/components/Avatar/AvatarView/components/loader.js.map +0 -1
- package/dist/components/Avatar/AvatarView/utils/useMouthSpeaking.d.ts +0 -2
- package/dist/components/Avatar/AvatarView/utils/useMouthSpeaking.js +0 -68
- package/dist/components/Avatar/AvatarView/utils/useMouthSpeaking.js.map +0 -1
- package/dist/components/AvatarView/components/avatar.d.ts +0 -9
- package/dist/components/AvatarView/components/avatar.js +0 -35
- package/dist/components/AvatarView/components/avatar.js.map +0 -1
- package/dist/components/AvatarView/components/fullbodyAvatar.d.ts +0 -10
- package/dist/components/AvatarView/components/fullbodyAvatar.js +0 -62
- package/dist/components/AvatarView/components/fullbodyAvatar.js.map +0 -1
- package/dist/components/AvatarView/components/loader.d.ts +0 -5
- package/dist/components/AvatarView/components/loader.js +0 -12
- package/dist/components/AvatarView/components/loader.js.map +0 -1
- package/dist/components/AvatarView/index.d.ts +0 -17
- package/dist/components/AvatarView/index.js +0 -35
- package/dist/components/AvatarView/index.js.map +0 -1
- package/dist/components/AvatarView/utils/useEyeBlink.d.ts +0 -2
- package/dist/components/AvatarView/utils/useEyeBlink.js +0 -40
- package/dist/components/AvatarView/utils/useEyeBlink.js.map +0 -1
- package/dist/components/AvatarView/utils/useHeadMovement.d.ts +0 -2
- package/dist/components/AvatarView/utils/useHeadMovement.js +0 -53
- package/dist/components/AvatarView/utils/useHeadMovement.js.map +0 -1
- package/dist/components/AvatarView/utils/useLoadingMorphAnim.d.ts +0 -2
- package/dist/components/AvatarView/utils/useLoadingMorphAnim.js +0 -34
- package/dist/components/AvatarView/utils/useLoadingMorphAnim.js.map +0 -1
- package/dist/components/AvatarView/utils/useMouthSpeaking.d.ts +0 -2
- package/dist/components/AvatarView/utils/useMouthSpeaking.js +0 -60
- package/dist/components/AvatarView/utils/useMouthSpeaking.js.map +0 -1
- package/dist/components/AvatarView/utils/useSmile.d.ts +0 -2
- package/dist/components/AvatarView/utils/useSmile.js +0 -30
- package/dist/components/AvatarView/utils/useSmile.js.map +0 -1
- package/dist/components/AvatarView/utils/utils.d.ts +0 -13
- package/dist/components/AvatarView/utils/utils.js +0 -42
- package/dist/components/AvatarView/utils/utils.js.map +0 -1
- package/dist/components/ImageUpload/ImageUpload.css +0 -168
- package/dist/components/ImageUpload/ImageUpload.d.ts +0 -28
- package/dist/components/ImageUpload/ImageUpload.js +0 -163
- package/dist/components/ImageUpload/ImageUpload.js.map +0 -1
- package/dist/components/layouts/Default.d.ts +0 -17
- package/dist/components/layouts/Default.js +0 -8
- package/dist/components/layouts/Default.js.map +0 -1
- package/dist/components/ui/Message.d.ts +0 -17
- package/dist/components/ui/Message.js +0 -13
- package/dist/components/ui/Message.js.map +0 -1
- package/esm/components/AttachmentMediaModal/AttachmentMediaModal.d.ts +0 -14
- package/esm/components/AttachmentMediaModal/AttachmentMediaModal.js +0 -63
- package/esm/components/AttachmentMediaModal/AttachmentMediaModal.js.map +0 -1
- package/esm/components/Avatar/AvatarView/components/controls.d.ts +0 -23
- package/esm/components/Avatar/AvatarView/components/controls.js +0 -52
- package/esm/components/Avatar/AvatarView/components/controls.js.map +0 -1
- package/esm/components/Avatar/AvatarView/components/fullbodyAvatar.d.ts +0 -19
- package/esm/components/Avatar/AvatarView/components/fullbodyAvatar.js +0 -57
- package/esm/components/Avatar/AvatarView/components/fullbodyAvatar.js.map +0 -1
- package/esm/components/Avatar/AvatarView/components/halfbodyAvatar.d.ts +0 -9
- package/esm/components/Avatar/AvatarView/components/halfbodyAvatar.js +0 -35
- package/esm/components/Avatar/AvatarView/components/halfbodyAvatar.js.map +0 -1
- package/esm/components/Avatar/AvatarView/components/loader.d.ts +0 -5
- package/esm/components/Avatar/AvatarView/components/loader.js +0 -9
- package/esm/components/Avatar/AvatarView/components/loader.js.map +0 -1
- package/esm/components/Avatar/AvatarView/utils/useMouthSpeaking.d.ts +0 -2
- package/esm/components/Avatar/AvatarView/utils/useMouthSpeaking.js +0 -65
- package/esm/components/Avatar/AvatarView/utils/useMouthSpeaking.js.map +0 -1
- package/esm/components/AvatarView/components/avatar.d.ts +0 -9
- package/esm/components/AvatarView/components/avatar.js +0 -31
- package/esm/components/AvatarView/components/avatar.js.map +0 -1
- package/esm/components/AvatarView/components/fullbodyAvatar.d.ts +0 -10
- package/esm/components/AvatarView/components/fullbodyAvatar.js +0 -58
- package/esm/components/AvatarView/components/fullbodyAvatar.js.map +0 -1
- package/esm/components/AvatarView/components/loader.d.ts +0 -5
- package/esm/components/AvatarView/components/loader.js +0 -9
- package/esm/components/AvatarView/components/loader.js.map +0 -1
- package/esm/components/AvatarView/index.d.ts +0 -17
- package/esm/components/AvatarView/index.js +0 -31
- package/esm/components/AvatarView/index.js.map +0 -1
- package/esm/components/AvatarView/utils/useEyeBlink.d.ts +0 -2
- package/esm/components/AvatarView/utils/useEyeBlink.js +0 -37
- package/esm/components/AvatarView/utils/useEyeBlink.js.map +0 -1
- package/esm/components/AvatarView/utils/useHeadMovement.d.ts +0 -2
- package/esm/components/AvatarView/utils/useHeadMovement.js +0 -50
- package/esm/components/AvatarView/utils/useHeadMovement.js.map +0 -1
- package/esm/components/AvatarView/utils/useLoadingMorphAnim.d.ts +0 -2
- package/esm/components/AvatarView/utils/useLoadingMorphAnim.js +0 -31
- package/esm/components/AvatarView/utils/useLoadingMorphAnim.js.map +0 -1
- package/esm/components/AvatarView/utils/useMouthSpeaking.d.ts +0 -2
- package/esm/components/AvatarView/utils/useMouthSpeaking.js +0 -57
- package/esm/components/AvatarView/utils/useMouthSpeaking.js.map +0 -1
- package/esm/components/AvatarView/utils/useSmile.d.ts +0 -2
- package/esm/components/AvatarView/utils/useSmile.js +0 -27
- package/esm/components/AvatarView/utils/useSmile.js.map +0 -1
- package/esm/components/AvatarView/utils/utils.d.ts +0 -13
- package/esm/components/AvatarView/utils/utils.js +0 -33
- package/esm/components/AvatarView/utils/utils.js.map +0 -1
- package/esm/components/ImageUpload/ImageUpload.css +0 -168
- package/esm/components/ImageUpload/ImageUpload.d.ts +0 -28
- package/esm/components/ImageUpload/ImageUpload.js +0 -160
- package/esm/components/ImageUpload/ImageUpload.js.map +0 -1
- package/esm/components/layouts/Default.d.ts +0 -17
- package/esm/components/layouts/Default.js +0 -5
- package/esm/components/layouts/Default.js.map +0 -1
- package/esm/components/ui/Message.d.ts +0 -17
- package/esm/components/ui/Message.js +0 -10
- package/esm/components/ui/Message.js.map +0 -1
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, useContext,
|
|
3
|
-
import { MathUtils } from 'three';
|
|
2
|
+
import { createContext, useContext, useRef, useCallback, useState, } from 'react';
|
|
4
3
|
const VisemeContext = createContext(undefined);
|
|
5
|
-
const VISEME_SMOOTHING = 0.3;
|
|
6
|
-
const DEFAULT_VISEME_DURATION = 0.1;
|
|
7
|
-
const MINIMUM_ELAPSED_TIME = 0.01;
|
|
8
|
-
const VISEME_SPEED_FACTOR = 1;
|
|
9
|
-
const AUDIO_PLAYBACK_RATE = 1;
|
|
10
|
-
const VISEME_BASE_SPEED = 1;
|
|
11
4
|
const VISEME_MAP = {
|
|
12
5
|
0: 'viseme_sil',
|
|
13
6
|
1: 'viseme_PP',
|
|
@@ -32,208 +25,98 @@ const VISEME_MAP = {
|
|
|
32
25
|
20: 'viseme_kk',
|
|
33
26
|
21: 'viseme_PP',
|
|
34
27
|
};
|
|
28
|
+
const DEFAULT_VISEME_DURATION = 0.04;
|
|
29
|
+
const VISEME_OVERLAP = 0.15;
|
|
30
|
+
const SMOOTHING_FACTOR = 0.35;
|
|
31
|
+
const TIME_OFFSET = -0.04;
|
|
32
|
+
const PRELOAD_TIME = 1;
|
|
35
33
|
export const VisemeProvider = ({ children, }) => {
|
|
36
|
-
const [isMeshSet, setIsMeshSet] = useState(false);
|
|
37
|
-
const [emotion, setEmotion] = useState('Neutral');
|
|
38
|
-
const isAnimatingRef = useRef(false);
|
|
39
|
-
const currentVisemesRef = useRef([]);
|
|
40
34
|
const visemeQueueRef = useRef([]);
|
|
41
|
-
const animationFrameRef = useRef(null);
|
|
42
35
|
const startTimeRef = useRef(null);
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
36
|
+
const [isProcessing, setIsProcessing] = useState(false);
|
|
37
|
+
const lastVisemeRef = useRef(null);
|
|
38
|
+
const addViseme = useCallback((visemeId, audioOffset) => {
|
|
39
|
+
const visemeName = VISEME_MAP[visemeId] || 'viseme_sil';
|
|
40
|
+
const startTime = audioOffset / 10000000 + TIME_OFFSET;
|
|
41
|
+
const endTime = startTime + DEFAULT_VISEME_DURATION;
|
|
42
|
+
const newViseme = {
|
|
43
|
+
name: visemeName,
|
|
44
|
+
weight: 0,
|
|
45
|
+
startTime,
|
|
46
|
+
endTime,
|
|
47
|
+
};
|
|
48
|
+
visemeQueueRef.current.push(newViseme);
|
|
49
|
+
if (!isProcessing) {
|
|
50
|
+
startProcessing();
|
|
58
51
|
}
|
|
59
|
-
}, [
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
const getCurrentViseme = useCallback((elapsedTime) => {
|
|
64
|
-
if (elapsedTime < MINIMUM_ELAPSED_TIME)
|
|
52
|
+
}, [isProcessing]);
|
|
53
|
+
const updateCurrentViseme = useCallback((currentTime) => {
|
|
54
|
+
if (!isProcessing || startTimeRef.current === null) {
|
|
55
|
+
console.log('StartTimeRef not set');
|
|
65
56
|
return null;
|
|
66
|
-
return currentVisemesRef.current.find((viseme, index) => {
|
|
67
|
-
const nextViseme = currentVisemesRef.current[index + 1];
|
|
68
|
-
return (elapsedTime >= viseme.startTime &&
|
|
69
|
-
(!nextViseme || elapsedTime < nextViseme.startTime));
|
|
70
|
-
});
|
|
71
|
-
}, []);
|
|
72
|
-
const getDynamicSpeedFactor = (visemeDuration) => {
|
|
73
|
-
const baseDuration = 0.1;
|
|
74
|
-
return (VISEME_BASE_SPEED * (baseDuration / visemeDuration) * AUDIO_PLAYBACK_RATE);
|
|
75
|
-
};
|
|
76
|
-
const applyViseme = useCallback((viseme, elapsedTime) => {
|
|
77
|
-
var _a;
|
|
78
|
-
if (!meshRef.current) {
|
|
79
|
-
console.error('Mesh not set');
|
|
80
|
-
return;
|
|
81
57
|
}
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
const
|
|
85
|
-
const easedProgress = easeInOutQuad(adjustedProgress);
|
|
86
|
-
const targetWeight = Math.sin(easedProgress * Math.PI) * viseme.weight;
|
|
87
|
-
currentVisemeWeightRef.current[viseme.name] = MathUtils.lerp(currentVisemeWeightRef.current[viseme.name] || 0, targetWeight, VISEME_SMOOTHING);
|
|
88
|
-
const visemeIndex = (_a = meshRef.current.morphTargetDictionary) === null || _a === void 0 ? void 0 : _a[viseme.name];
|
|
89
|
-
if (typeof visemeIndex === 'number' &&
|
|
90
|
-
meshRef.current.morphTargetInfluences) {
|
|
91
|
-
meshRef.current.morphTargetInfluences[visemeIndex] =
|
|
92
|
-
currentVisemeWeightRef.current[viseme.name];
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
console.error(`Viseme not found in morph target dictionary: ${viseme.name}`);
|
|
96
|
-
}
|
|
97
|
-
Object.keys(currentVisemeWeightRef.current).forEach((visemeName) => {
|
|
98
|
-
var _a;
|
|
99
|
-
if (visemeName !== viseme.name) {
|
|
100
|
-
currentVisemeWeightRef.current[visemeName] = lerp(currentVisemeWeightRef.current[visemeName], 0, VISEME_SMOOTHING * 0.5);
|
|
101
|
-
const index = (_a = meshRef.current.morphTargetDictionary) === null || _a === void 0 ? void 0 : _a[visemeName];
|
|
102
|
-
if (typeof index === 'number' && meshRef.current.morphTargetInfluences) {
|
|
103
|
-
meshRef.current.morphTargetInfluences[index] = currentVisemeWeightRef.current[visemeName];
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
}, []);
|
|
108
|
-
const animate = useCallback((time) => {
|
|
109
|
-
if (startTimeRef.current === null) {
|
|
110
|
-
startTimeRef.current = time;
|
|
111
|
-
}
|
|
112
|
-
const elapsedTime = ((time - startTimeRef.current) / 1000) * VISEME_SPEED_FACTOR;
|
|
113
|
-
const currentViseme = getCurrentViseme(elapsedTime);
|
|
58
|
+
const elapsedTime = currentTime - startTimeRef.current + PRELOAD_TIME;
|
|
59
|
+
visemeQueueRef.current = visemeQueueRef.current.filter(v => v.endTime > elapsedTime);
|
|
60
|
+
const currentViseme = visemeQueueRef.current.find(v => v.startTime <= elapsedTime && v.endTime > elapsedTime - VISEME_OVERLAP);
|
|
114
61
|
if (currentViseme) {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
clearVisemes();
|
|
62
|
+
console.log('CurrentViseme Found!');
|
|
63
|
+
const visemeProgress = (elapsedTime - currentViseme.startTime) /
|
|
64
|
+
(currentViseme.endTime - currentViseme.startTime);
|
|
65
|
+
const targetWeight = Math.sin(Math.PI * Math.min(visemeProgress, 1));
|
|
66
|
+
const smoothedWeight = lastVisemeRef.current
|
|
67
|
+
? lastVisemeRef.current.weight +
|
|
68
|
+
(targetWeight - lastVisemeRef.current.weight) * SMOOTHING_FACTOR
|
|
69
|
+
: targetWeight;
|
|
70
|
+
const updatedViseme = { ...currentViseme, weight: smoothedWeight };
|
|
71
|
+
lastVisemeRef.current = updatedViseme;
|
|
72
|
+
return updatedViseme;
|
|
127
73
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
const nextViseme = azureVisemes[i + 1];
|
|
137
|
-
const duration = nextViseme
|
|
138
|
-
? (nextViseme.audioOffset - currentViseme.audioOffset) / 10000000
|
|
139
|
-
: DEFAULT_VISEME_DURATION;
|
|
140
|
-
const processedViseme = {
|
|
141
|
-
name: VISEME_MAP[currentViseme.visemeId] || 'viseme_sil',
|
|
142
|
-
duration,
|
|
143
|
-
weight: 1,
|
|
144
|
-
startTime: currentViseme.audioOffset / 10000000,
|
|
145
|
-
};
|
|
146
|
-
return processedViseme;
|
|
147
|
-
});
|
|
148
|
-
const interpolatedVisemes = [];
|
|
149
|
-
for (let i = 0; i < processedVisemes.length - 1; i++) {
|
|
150
|
-
const currentViseme = processedVisemes[i];
|
|
151
|
-
const nextViseme = processedVisemes[i + 1];
|
|
152
|
-
interpolatedVisemes.push(currentViseme);
|
|
153
|
-
const intermediateDuration = (nextViseme.startTime - currentViseme.startTime) * 0.5;
|
|
154
|
-
interpolatedVisemes.push({
|
|
155
|
-
name: 'viseme_sil',
|
|
156
|
-
duration: intermediateDuration,
|
|
157
|
-
weight: 0.5,
|
|
158
|
-
startTime: currentViseme.startTime + intermediateDuration,
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
interpolatedVisemes.push(processedVisemes[processedVisemes.length - 1]);
|
|
162
|
-
currentVisemesRef.current = interpolatedVisemes;
|
|
163
|
-
if (!isAnimatingRef.current) {
|
|
164
|
-
isAnimatingRef.current = true;
|
|
165
|
-
startTimeRef.current = performance.now();
|
|
166
|
-
animationFrameRef.current = requestAnimationFrame(animate);
|
|
167
|
-
}
|
|
168
|
-
else {
|
|
169
|
-
if (startTimeRef.current !== null) {
|
|
170
|
-
const currentTime = performance.now();
|
|
171
|
-
const elapsedTime = ((currentTime - startTimeRef.current) / 1000) * VISEME_SPEED_FACTOR;
|
|
172
|
-
startTimeRef.current =
|
|
173
|
-
currentTime - (elapsedTime / VISEME_SPEED_FACTOR) * 1000;
|
|
74
|
+
if (lastVisemeRef.current) {
|
|
75
|
+
const reducedWeight = lastVisemeRef.current.weight * (1 - SMOOTHING_FACTOR);
|
|
76
|
+
if (reducedWeight > 0.01) {
|
|
77
|
+
lastVisemeRef.current = {
|
|
78
|
+
...lastVisemeRef.current,
|
|
79
|
+
weight: reducedWeight,
|
|
80
|
+
};
|
|
81
|
+
return lastVisemeRef.current;
|
|
174
82
|
}
|
|
175
83
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
if (((_a = meshRef.current) === null || _a === void 0 ? void 0 : _a.morphTargetDictionary) &&
|
|
187
|
-
((_b = meshRef.current) === null || _b === void 0 ? void 0 : _b.morphTargetInfluences)) {
|
|
188
|
-
Object.values(meshRef.current.morphTargetDictionary).forEach(index => {
|
|
189
|
-
if (typeof index === 'number') {
|
|
190
|
-
meshRef.current.morphTargetInfluences[index] = 0;
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
currentVisemeWeightRef.current = {};
|
|
84
|
+
lastVisemeRef.current = null;
|
|
85
|
+
return null;
|
|
86
|
+
}, [isProcessing]);
|
|
87
|
+
const startProcessing = useCallback(() => {
|
|
88
|
+
startTimeRef.current = performance.now() / 1000;
|
|
89
|
+
setIsProcessing(true);
|
|
90
|
+
}, [isProcessing]);
|
|
91
|
+
const stopProcessing = useCallback(() => {
|
|
92
|
+
setIsProcessing(false);
|
|
195
93
|
startTimeRef.current = null;
|
|
196
|
-
|
|
94
|
+
lastVisemeRef.current = null;
|
|
197
95
|
}, []);
|
|
198
|
-
const
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
Sorpresa: { Sorpresa: 1 },
|
|
202
|
-
Tristezza: { Tristezza: 1 },
|
|
203
|
-
Timore: { Timore: 1 },
|
|
204
|
-
};
|
|
205
|
-
const emotionToAzureStyleMap = {
|
|
206
|
-
Gioia: 'cheerful',
|
|
207
|
-
Rabbia: 'angry',
|
|
208
|
-
Sorpresa: 'excited',
|
|
209
|
-
Tristezza: 'sad',
|
|
210
|
-
Timore: 'terrified',
|
|
211
|
-
};
|
|
212
|
-
function getAzureStyleForEmotion(emotion) {
|
|
213
|
-
return emotionToAzureStyleMap[emotion] || 'neutral';
|
|
214
|
-
}
|
|
215
|
-
useEffect(() => {
|
|
216
|
-
return () => {
|
|
217
|
-
if (animationFrameRef.current !== null) {
|
|
218
|
-
cancelAnimationFrame(animationFrameRef.current);
|
|
219
|
-
}
|
|
220
|
-
};
|
|
96
|
+
const resetVisemeQueue = useCallback(() => {
|
|
97
|
+
visemeQueueRef.current = [];
|
|
98
|
+
lastVisemeRef.current = null;
|
|
221
99
|
}, []);
|
|
100
|
+
const resetAndStartProcessing = useCallback(() => {
|
|
101
|
+
stopProcessing();
|
|
102
|
+
resetVisemeQueue();
|
|
103
|
+
startTimeRef.current = performance.now() / 1000;
|
|
104
|
+
setIsProcessing(true);
|
|
105
|
+
}, [stopProcessing, resetVisemeQueue]);
|
|
222
106
|
const contextValue = {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
getAzureStyleForEmotion,
|
|
107
|
+
addViseme,
|
|
108
|
+
updateCurrentViseme,
|
|
109
|
+
startProcessing,
|
|
110
|
+
stopProcessing,
|
|
111
|
+
resetAndStartProcessing,
|
|
112
|
+
resetVisemeQueue,
|
|
113
|
+
isProcessing,
|
|
231
114
|
};
|
|
232
115
|
return (_jsx(VisemeContext.Provider, { value: contextValue, children: children }));
|
|
233
116
|
};
|
|
234
117
|
export const useViseme = () => {
|
|
235
118
|
const context = useContext(VisemeContext);
|
|
236
|
-
if (context
|
|
119
|
+
if (!context) {
|
|
237
120
|
throw new Error('useViseme must be used within a VisemeProvider');
|
|
238
121
|
}
|
|
239
122
|
return context;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visemeContext.js","sourceRoot":"","sources":["../../src/context/visemeContext.tsx"],"names":[],"mappings":";AAAA,OAAc,EACZ,aAAa,EACb,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"visemeContext.js","sourceRoot":"","sources":["../../src/context/visemeContext.tsx"],"names":[],"mappings":";AAAA,OAAc,EACZ,aAAa,EACb,UAAU,EACV,MAAM,EACN,WAAW,EACX,QAAQ,GAET,MAAM,OAAO,CAAC;AAmBf,MAAM,aAAa,GAAG,aAAa,CAAgC,SAAS,CAAC,CAAC;AAE9E,MAAM,UAAU,GAA8B;IAC5C,CAAC,EAAE,YAAY;IACf,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,WAAW;IACd,EAAE,EAAE,WAAW;IACf,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,UAAU;IAEd,EAAE,EAAE,WAAW;IACf,EAAE,EAAE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,EAAE,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAEvC,MAAM,YAAY,GAAG;QACnB,SAAS;QACT,mBAAmB;QACnB,eAAe;QACf,cAAc;QACd,uBAAuB;QACvB,gBAAgB;QAChB,YAAY;KACb,CAAC;IAEF,OAAO,CACL,KAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,YACxC,QAAQ,GACc,CAC1B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAsB,EAAE;IAC/C,MAAM,OAAO,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IAC1C,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;KACnE;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -57,7 +57,7 @@ const Avatar: React.FC<Props> = ({
|
|
|
57
57
|
const { t } = useTranslation();
|
|
58
58
|
const [isClient, setIsClient] = useState(false);
|
|
59
59
|
|
|
60
|
-
const {
|
|
60
|
+
const { stopProcessing, updateCurrentViseme, resetVisemeQueue } = useViseme();
|
|
61
61
|
|
|
62
62
|
useEffect(() => {
|
|
63
63
|
setIsClient(true);
|
|
@@ -132,6 +132,7 @@ const Avatar: React.FC<Props> = ({
|
|
|
132
132
|
}
|
|
133
133
|
>
|
|
134
134
|
<ContainerAvatarView
|
|
135
|
+
updateCurrentViseme={updateCurrentViseme}
|
|
135
136
|
url={integrationConfig.avatarURL}
|
|
136
137
|
sex={memori.voiceType === 'FEMALE' ? 'FEMALE' : 'MALE'}
|
|
137
138
|
fallbackImg={getAvatarUrl()}
|
|
@@ -142,11 +143,10 @@ const Avatar: React.FC<Props> = ({
|
|
|
142
143
|
speaking={isPlayingAudio}
|
|
143
144
|
loading={loading}
|
|
144
145
|
style={getAvatarStyle()}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
isZoomed={isZoomed}
|
|
146
|
+
stopProcessing={stopProcessing}
|
|
147
|
+
resetVisemeQueue={resetVisemeQueue}
|
|
148
|
+
isZoomed={isZoomed}
|
|
148
149
|
chatEmission={chatProps?.dialogState?.emission}
|
|
149
|
-
setEmotion={setEmotion}
|
|
150
150
|
/>
|
|
151
151
|
</ErrorBoundary>
|
|
152
152
|
);
|
|
@@ -14,9 +14,9 @@ interface Props {
|
|
|
14
14
|
speaking: boolean;
|
|
15
15
|
isZoomed: boolean;
|
|
16
16
|
chatEmission: any;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
stopProcessing: () => void;
|
|
18
|
+
resetVisemeQueue: () => void;
|
|
19
|
+
updateCurrentViseme: (currentTime: number) => { name: string; weight: number } | null;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
interface BaseAction {
|
|
@@ -50,9 +50,9 @@ const baseActions: Record<string, BaseAction> = {
|
|
|
50
50
|
Loading3: { weight: 0 },
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
+
|
|
53
54
|
export const AvatarView: React.FC<Props & { halfBody: boolean }> = ({
|
|
54
|
-
|
|
55
|
-
clearVisemes,
|
|
55
|
+
stopProcessing,
|
|
56
56
|
chatEmission,
|
|
57
57
|
showControls,
|
|
58
58
|
animation,
|
|
@@ -64,7 +64,8 @@ export const AvatarView: React.FC<Props & { halfBody: boolean }> = ({
|
|
|
64
64
|
halfBody,
|
|
65
65
|
loading,
|
|
66
66
|
isZoomed,
|
|
67
|
-
|
|
67
|
+
updateCurrentViseme,
|
|
68
|
+
resetVisemeQueue,
|
|
68
69
|
}) => {
|
|
69
70
|
const [currentBaseAction, setCurrentBaseAction] = useState({
|
|
70
71
|
action: animation || 'Idle1',
|
|
@@ -77,6 +78,9 @@ export const AvatarView: React.FC<Props & { halfBody: boolean }> = ({
|
|
|
77
78
|
const [morphTargetDictionary, setMorphTargetDictionary] = useState<{
|
|
78
79
|
[key: string]: number;
|
|
79
80
|
}>({});
|
|
81
|
+
const [emotionMorphTargets, setEmotionMorphTargets] = useState<{
|
|
82
|
+
[key: string]: number;
|
|
83
|
+
}>({});
|
|
80
84
|
|
|
81
85
|
const [timeScale, setTimeScale] = useState(0.8);
|
|
82
86
|
|
|
@@ -93,7 +97,7 @@ export const AvatarView: React.FC<Props & { halfBody: boolean }> = ({
|
|
|
93
97
|
|
|
94
98
|
//remove the last character from the action
|
|
95
99
|
const newEmotion = action.slice(0, -1);
|
|
96
|
-
setEmotion(newEmotion);
|
|
100
|
+
// setEmotion(newEmotion);
|
|
97
101
|
|
|
98
102
|
const defaultEmotions = Object.keys(emotionMap).reduce((acc, key) => {
|
|
99
103
|
acc[key] = 0;
|
|
@@ -105,9 +109,8 @@ export const AvatarView: React.FC<Props & { halfBody: boolean }> = ({
|
|
|
105
109
|
const emotionValues =
|
|
106
110
|
emotion === 'default' ? defaultEmotions : emotionMap[emotion];
|
|
107
111
|
|
|
108
|
-
|
|
109
|
-
...
|
|
110
|
-
...defaultEmotions,
|
|
112
|
+
setEmotionMorphTargets(prevEmotions => ({
|
|
113
|
+
...prevEmotions,
|
|
111
114
|
...emotionValues,
|
|
112
115
|
}));
|
|
113
116
|
}, []);
|
|
@@ -162,6 +165,11 @@ export const AvatarView: React.FC<Props & { halfBody: boolean }> = ({
|
|
|
162
165
|
const emotion = `${outputContent}${randomNumber}`;
|
|
163
166
|
|
|
164
167
|
onBaseActionChange(emotion);
|
|
168
|
+
} else {
|
|
169
|
+
//Set a random idle animation
|
|
170
|
+
const randomNumber = Math.floor(Math.random() * 5) + 1;
|
|
171
|
+
const animation = `Idle${randomNumber === 3 ? 4 : randomNumber}`;
|
|
172
|
+
onBaseActionChange(animation);
|
|
165
173
|
}
|
|
166
174
|
}, [chatEmission]);
|
|
167
175
|
|
|
@@ -174,6 +182,13 @@ export const AvatarView: React.FC<Props & { halfBody: boolean }> = ({
|
|
|
174
182
|
}
|
|
175
183
|
}, [loading]);
|
|
176
184
|
|
|
185
|
+
// useEffect(() => {
|
|
186
|
+
// if (speaking && currentBaseAction.action !== 'Idle1') {
|
|
187
|
+
// const animation = `Idle1`;
|
|
188
|
+
// onBaseActionChange(animation);
|
|
189
|
+
// }
|
|
190
|
+
// }, [speaking]);
|
|
191
|
+
|
|
177
192
|
return (
|
|
178
193
|
<>
|
|
179
194
|
{showControls && (
|
|
@@ -191,30 +206,29 @@ export const AvatarView: React.FC<Props & { halfBody: boolean }> = ({
|
|
|
191
206
|
{halfBody ? (
|
|
192
207
|
<HalfBodyAvatar
|
|
193
208
|
url={url}
|
|
194
|
-
setMeshRef={setMeshRef}
|
|
195
|
-
setMorphTargetInfluences={setMorphTargetInfluences}
|
|
196
209
|
headMovement={headMovement}
|
|
197
210
|
speaking={speaking}
|
|
198
211
|
eyeBlink={eyeBlink}
|
|
199
212
|
morphTargetInfluences={morphTargetInfluences}
|
|
200
|
-
|
|
213
|
+
setMorphTargetInfluences={setMorphTargetInfluences}
|
|
201
214
|
setMorphTargetDictionary={setMorphTargetDictionary}
|
|
215
|
+
updateCurrentViseme={updateCurrentViseme}
|
|
202
216
|
/>
|
|
203
217
|
) : (
|
|
204
218
|
<FullbodyAvatar
|
|
205
219
|
url={url}
|
|
206
220
|
sex={sex}
|
|
221
|
+
resetVisemeQueue={resetVisemeQueue}
|
|
207
222
|
eyeBlink={eyeBlink}
|
|
208
|
-
speaking={speaking}
|
|
209
223
|
currentBaseAction={currentBaseAction}
|
|
210
224
|
timeScale={timeScale}
|
|
211
|
-
setMorphTargetInfluences={setMorphTargetInfluences}
|
|
212
|
-
setMorphTargetDictionary={setMorphTargetDictionary}
|
|
213
225
|
morphTargetInfluences={morphTargetInfluences}
|
|
214
|
-
morphTargetDictionary={morphTargetDictionary}
|
|
215
226
|
isZoomed={isZoomed}
|
|
216
|
-
|
|
217
|
-
|
|
227
|
+
updateCurrentViseme={updateCurrentViseme}
|
|
228
|
+
stopProcessing={stopProcessing}
|
|
229
|
+
setMorphTargetDictionary={setMorphTargetDictionary}
|
|
230
|
+
setMorphTargetInfluences={setMorphTargetInfluences}
|
|
231
|
+
emotionMorphTargets={emotionMorphTargets}
|
|
218
232
|
/>
|
|
219
233
|
)}
|
|
220
234
|
</>
|