How TTS Engines Generate Visemes for 3D Lip Sync

Generating realistic, synchronized lip movements for 3D digital avatars requires converting written text into both audible speech and corresponding visual mouth shapes, known as visemes. Text-to-Speech (TTS) engines accomplish this by breaking text down into phonetic units, predicting their precise temporal durations, and mapping those phonemes to standardized visual targets. This article details the end-to-end pipeline that modern TTS architectures use to generate time-aligned viseme streams and blendshape weights for 3D character animation.

1. Text Normalization and Grapheme-to-Phoneme (G2P) Conversion

The pipeline begins with standard text normalization, where numbers, abbreviations, and symbols are converted into spoken words. Once normalized, a Grapheme-to-Phoneme (G2P) algorithm converts the raw orthographic text into phonemes—the smallest acoustic units of speech (e.g., using the International Phonetic Alphabet or ARPAbet). This step is critical because spelling does not strictly correspond to pronunciation or mouth geometry.

2. Acoustic Modeling and Duration Prediction

Modern neural TTS systems (such as FastSpeech, VITS, or Tacotron variants) employ acoustic models equipped with explicit duration predictors. As the network generates audio representations (such as mel-spectrograms), the duration predictor determines the exact start time and duration (typically measured in milliseconds or audio frames) of each phoneme. This step establishes the foundational clock that ensures visual lip shapes match the synthesized audio waveform.

3. Phoneme-to-Viseme Mapping

A viseme is the visual counterpart of a phoneme. While human speech utilizes dozens of distinct phonemes, many produce identical visual shapes. For example, the bilabial consonants /p/, /b/, and /m/ all require the lips to press together, meaning they share a single viseme.

TTS engines utilize predefined mapping tables (such as the Disney 12/16 viseme set, Microsoft SAPI visemes, or ARKit-compatible face blendshapes) to convert the timed sequence of phonemes into viseme identifiers.

4. Coarticulation and Dynamic Weighting

Real human speech does not transition instantly between static mouth positions. Instead, mouth shape is heavily influenced by preceding and upcoming sounds—a phenomenon known as coarticulation. For instance, the mouth pre-shapes into a rounded position for the vowel in "boot" while still pronouncing the "b".

Advanced TTS engines address coarticulation through two primary methods:

5. Delivery and Integration with 3D Engines

The output of this pipeline is a time-indexed data stream delivered alongside the audio file or real-time audio stream. This payload typically contains:

In the 3D rendering engine (such as Unreal Engine, Unity, or WebGL), these weight values directly drive the morph targets or skeletal bones of the avatar's face rig, yielding fluid, realistic, and frame-accurate visual speech synchronization.