Browse
 
Tools
Rss Categories

LV_TTS Summary

Reference Number: AA-01475 Views: 2970 0 Rating/ Voters

The following "C" API is exported from the LVSpeechPort dll. For C++ programmers, these functions are wrapped in class LVTTSClient.

The C-Style interface, exposed from LV_TTS.h, can be used by several different languages in addition to C, allowing a great deal of flexibility to customers within to write their own custom interfaces in whichever languages they choose(such as C# or VB for example).

All of the base functionality required to create TTS audio is exposed through the LV_TTS_xxxx interface functions, which are shown below.These can be used collectively to provide full control over the TTS portion of the client interface,allowing developers to interact at a precise level, directly within their own code.

License requests are made during LV_TTS_CreateClient, which will fail if no license is available. Users should call LV_TTS_DestroyClient to release these licenses, so that they become available for subsequent calls.

Port Management Functions

LV_TTS_CreateClient Creates a TTS client object that is necessary to perform any TTS operations

LV_TTS_DestroyClient Releases a TTS client object that was created using LV_TTS_CreateClient.

LV_TTS_ReturnErrorString Returns a description of an error code

Synthesis Operation Functions

LV_TTS_Synthesize Perform the text to speech synthesis operation for the given sentence or SSML text.

LV_TTS_SynthesizeURL Perform the text to speech synthesis operation for the given sentence or SSML text.

LV_TTS_WaitForSynthesis Suspend the current thread until either a response for a previous non-blocking synthesis operation is available or the specified timeout period elapses.

Property Set/Get Functions

LV_TTS_GetFloatPropertyEx Returns the specified configuration setting value for "float" type options for the associated TTS client object

LV_TTS_GetIntPropertyEx Returns the specified configuration setting value for "int" type options for the associated TTS client object

LV_TTS_GetStringPropertyEx Returns the specified configuration setting value for "string" type options for the associated TTS client object

LV_TTS_SetPropertyEx Set optional configuration properties for the LV_TTS interface.

Result Access Functions

Errors

LV_TTS_GetLastSSMLError Returns a character string from the last SSML syntax error, if any

LV_TTS_GetLastSynthesisErrorCode Returns the last (non-SSML) TTS error code, or LV_SUCCESS if no error is recorded.

LV_TTS_GetLastSynthesisError Returns a character string from the last (non-SSML) synthesis error, if any.

Warnings

LV_TTS_GetSynthesisWarningCount Returns the number of warning created during the Text-To-Speech process.

LV_TTS_GetSynthesisWarningMessage Returns the message of the specified warning as a character string.

LV_TTS_GetSynthesisWarningMessageLen Returns the length of the message of the specified warning.

LV_TTS_GetSynthesisWarningSSMLLine Returns the SSML line number of the specified warning.

SSML Marks

LV_TTS_GetSSMLMarksCount Returns the number of text-to-speech SSML marks available in the active synthesis result.

LV_TTS_GetSSMLMarkOffsetInBuffer Returns the offset, in bytes, to the beginning of the specified SSML mark in the synthesized audio buffer.

LV_TTS_GetSSMLMarkName Returns the name of the specified SSML mark as a character string.

Visemes

LV_TTS_GetVisemesCount Returns the number of text-to-speech visemes available in the active synthesis result.

LV_TTS_GetVisemeOffsetInBuffer Returns the offset, in bytes, to the beginning of the specified viseme in the synthesized audio buffer.

LV_TTS_GetVisemeName Returns the name of the specified viseme as a character string.

Audio

LV_TTS_GetSynthesizedAudioBuffer Read all, or some portion of the synthesized audio buffer that was obtained from a LV_TTS_Synthesize or LV_TTS_SynthesizeURL call.

LV_TTS_GetSynthesizedAudioBufferLength Returns the size, in bytes, of the synthesized audio buffer that was produced from a previous LV_TTS_Synthesize or LV_TTS_SynthesizeURL call.

LV_TTS_GetSynthesizedAudioFormat Returns the sound format of the synthesized audio from the last call to LV_TTS_Synthesize or LV_TTS_SynthesizeURL.

LV_TTS_GetSynthesizedAudioSampleRate Returns the sample rate (in Hz) of the synthesized audio from the last call to LV_TTS_Synthesize or LV_TTS_SynthesizeURL.

Other

LV_TTS_JumpToSSMLMark Move the buffer offset to the beginning of the specified SSML mark so that the next call to LV_TTS_GetSynthesizedAudioBuffer returns samples starting at that offset.

LV_TTS_RewindBuffer Reset the buffer read offset so that the next invocation of LV_TTS_GetSynthesizedAudioBuffer starts from the first sample in the buffer.


Miscellaneous Functions

LV_TTS_AddEvent Allows "events" to be added to call log files.

LV_TTS_AddFieldToRequest Adds a custom string to a named field in the call log file, that can be used to filter or identify certain calls.

LV_TTS_GetCallGuid Query the ID used in call logging. It can be used in conjunction with LV_TTS_SetCustomCallGuid to link events across ASR ports and TTS ports to the same call log.

LV_TTS_SetCustomCallGuid This can optionally be called to set the ID string used in call logging. This may be useful if advanced call identification is needed.

LV_TTS_IsServerAvailable Returns a value based on whether there are any connected TTS servers available.