I try to perform LipSync on a ReadyPlayer.me avatar in ThreeJS. The puppet already have Viseme Face Rigged Morph Target. I'm usings Microsoft Speech SDK to retrieve the audio and the Viseme values (timecode / ID) and Map it correctly.
Demo (the 1st part) : https://www.youtube.com/watch?v=vLbQ2arXzRk
Here is my algorithm / workflow:
- Start playing audio
- Reset N-1 MorphTargetInfluence to 0
- Update MorphTargetInfluence
head.morphTargetInfluences[ viseme.id ] = 0.7 - Wait until next offset
setTimeout(...) - On the AnimationLoop I call
renderer.render( scene, camera );
Questions & Issues
- The morphing is not smooth, how can I set smooth animation from 0 to 0.7 ?
- Should I reset previous morphTarget to 0 ? (I assume yes)
- In this Forum they use TWEEN but I don't think it is efficient to create an object every 50ms ? And how long should last the animation may be under 100 or 200ms it's not relevant ?
Thanks, I'm new to Three.js