Browse
 
Tools
Rss Categories

LV_TTS_GetVisemeOffsetInBuffer

Reference Number: AA-01848 Views: 11940 0 Rating/ Voters

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)

Function

  • LV_TTS_RETURN_CODE LV_TTS_GetVisemeOffsetInBuffer(HTTSCLIENT client_handle, unsigned int viseme_idx, int * buffer_offset);

Parameters

client_handle

Handle to the TTS client object.

viseme_idx

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.

buffer_offset

Pointer to an integer variable into which the offset value will be returned.

Return Values

LV_SUCCESS

No errors; the queried offset value is available in buffer_offset.

LV_INVALID_TTS_HANDLE

The input TTS client handle is not a valid one.

LV_NO_RESULT_AVAILABLE

Synthesis results are not yet available.

LV_FAILURE

The input viseme_idx is out of range.

LV_EXCEPTION

An exception occurred while processing the request.

Remarks

Also note that visemes will only be generated if viseme generation is enabled via LV_TTS_SetPropertyEx.