Skip to main content
The server sends the mouth shape of every sound of the voice (15 visemes, free, in every language) and Lokutor Lip Sync plays them on the clock of what is being heard, so the mouth stays in time through buffers, pauses and interruptions. Visemes are on by default.

Set it up

Nothing to do for a face it recognises: the agent adds the component by itself and moves every mesh under it whose mouth it knows. To choose the meshes or change the feel, Add Component > Lokutor > Lokutor Lip Sync on the character (the agent’s object, under it or above it) and fill in Faces. Teeth and tongue meshes go there too if they have the shapes. The mouth is recognised by the names of its blend shapes. Upper and lower case do not matter, nor what an FBX exporter puts in front (Face.viseme_aa):
The agent’s own Face, Mouth Blend Shape and Jaw still work for a simple mouth.

Your own names

Mapping says which of your shapes make each viseme, and how much of each. In the Inspector, or:
The viseme names are LokutorApi.Visemes: sil PP FF TH DD kk CH SS nn RR aa E ih oh ou. sil is the mouth at rest and needs no shape.

A jaw, or drawings

  • Jaw: a bone or head part rotated around its local X axis; Jaw Max Angle is its widest. Jaws and blend shapes can be used together.
  • Mouth Sprite: a SpriteRenderer. Mouth Sprites are four drawings (closed, slightly open, open, round), or Viseme Sprites gives one for each viseme. For a UI Image or a material, ask MouthSprite() which one it is.
For anything else read MouthOpen (0 to 1), Current (the strongest viseme) or Weights (the 15 of them), or listen to onVisemeChanged:

The feel

Several voices, one mouth

A character can have a Lokutor Agent for conversation and a Lokutor Voice for written lines. Put the voice on its own GameObject, because each plays through its own AudioSource; they share the character’s Lokutor Lip Sync, and the mouth follows whoever is speaking.

Without visemes

When a voice has none, the mouth follows its loudness (gain sets how much). To drive a mouth from audio of your own, call PushVisemes with its visemes, if it has them, and Advance every frame with how much of it has been heard:
LipSync and MouthRig are the same thing without the engine, for other renderers.

With moods and expressions

It writes in LateUpdate, after the Animator, and only the shapes it found, so expressions on other shapes of the same mesh are yours. Mouth expressions (a smile, a frown) and visemes add up: fade yours to about a third while the character speaks. Game characters has the whole recipe, and Asset pipeline the shapes to model.