pixi-live2d-display
pixi-live2d-display copied to clipboard
How to make the model do the lipsync?
Is it possible for a model to do lipsync? I can't seem to find any lipsync contents on the documentation. Could you guys help me?
Here's my current code:
const app = new Application({
view: document.getElementById("canvas") as
| HTMLCanvasElement
| undefined,
autoStart: true,
resizeTo: window,
backgroundAlpha: 0,
})
const model = await Live2DModel.from(sampleModel3, {
autoInteract: false,
})
const scaleX = innerWidth / model.width
const scaleY = innerHeight / model.height
model.scale.set(Math.min(scaleX, scaleY))
model.x = innerWidth / 2 - model.width / 2
// can't access speak property, how do i lipsync the model?
model.speak()
app.stage.addChild(model)
Lib versions:
pixi-live2d-display: 0.4.0
pixi.js: 6.5.2
Thanks a lot!