Returns the offset, in bytes, to the beginning of the specified viseme in the synthesized audio buffer. The offset provided is relative to the start of the buffer. Documentation is available to convert buffer offset to milliseconds.
Visemes represent facial expressions related to the pronunciation of certain phonemes. This information can be used to align visual cues to audio playback. This may be useful in applications such as lip-syncing. When viseme generation is enabled, these markers will be generated whenever synthesis is performed. For each viseme, there will be an offset (in bytes) within the audio buffer along with a name for each.
Please refer to the phoneme tables associated with the TTS language you are using to look up the viseme that corresponds with each phoneme produced during synthesis.
This functionality was added in LumenVox version 11.3.100 (August 2013)
- LV_TTS_RETURN_CODE LV_TTS_GetVisemeOffsetInBuffer(HTTSCLIENT client_handle, unsigned int viseme_idx, int * buffer_offset);
Handle to the TTS client object.
Index of the viseme to whose beginning the offset in buffer is being queried. It must be in the range [0, (viseme_count - 1)] where viseme_count was obtained from a call to LV_TTS_GetVisemesCount.
Pointer to an integer variable into which the offset value will be returned.
No errors; the queried offset value is available in buffer_offset.
The input TTS client handle is not a valid one.
Synthesis results are not yet available.
The input viseme_idx is out of range.
An exception occurred while processing the request.
Also note that visemes will only be generated if viseme generation is enabled via LV_TTS_SetPropertyEx.