TtsGetLipSyncInfo

Get the visual cue associated the current TTS audio.

TTSRETVAL TtsGetLipSyncInfo (
 TTS_MARKER_PHONEME * pMarkerPhoneme,
 TTS_LIPSYNC_INFO   * pLipSyncInfo)

Argument

Description

pMarkerPhoneme

[in] Handle to a phoneme marker in the current TTS audio.

pLipSyncInfo

[out] Handle to the visual cue, known as a viseme.

Use this function to perform lip syncing with visemes.

A viseme is a generic facial image associated with a sound. It is the visual equivalent of a linguistic phoneme of spoken language. You can use visemes to mimic the facial expressions and movements associated with Vocalizer speech. For example, you can synchronize TTS audio with an avatar that appears to speak the audio from the TTS engine. Your customers benefit when they see and hear speech at the same time, and hearing-impaired customers can often read the avatar's lips even if they cannot hear the audio.

Before using this function:

  1. Set the TTS_MRK_PHONEME flag in the marker_mode mask.
  2. Use the TTS_EVENT_CB callback function to populate pMarkerPhoneme with the phoneme marker.

The function returns visemes in a JSON object:

"lipSyncInfo" :
   {
      "jawOpen" : "n",
      "teethUpVisible" : "n",
      "teethLoVisible" : "n",
      "mouthHeight" : "n",
      "mouthWidth" : "n",
      "mouthUpturn" : "n",
      "tonguePos" : "n",
      "lipTension" : "n"
   }
Field Description (all value ranges are a linear scale from 0 to 255)
jawOpen

Opening angle of the jaw: 0 = fully closed, and 255 = completely open.

teethUpVisible

Indicates if upper teeth are visible: 0 = completely hidden, 128 = only the teeth are visible, and 255 = teeth and gums are exposed.

teethLoVisible

Indicates if lower teeth are visible: 0 = completely hidden, 128 = only the teeth are visible, and 255 = teeth and gums are exposed.

mouthHeight

Mouth height: 0 = minimum height (mouth and lips are closed), and 255 = maximum possible height.

mouthWidth

Mouth or lips width: 0 = minimum width (mouth and lips are puckered), and 255 = maximum possible width.

mouthUpturn

Indicates how much the mouth is turned up at the corners: 0 = corners turned down, 128 = neutral, and 255 = corners are turned up.

tonguePos

Indicates the tongue position relative to the upper teeth: 0 = tongue is completely relaxed, and 255 = tongue is against the upper teeth.

lipTension

Lip tension on a 0 to 255 linear scale: 0 = lips are completely relaxed, and 255 = lips are very tense.