The TTS C++ interface is exposed via the LVTTSClient class as defined in LVTTSClient.h
This class is simply a lightweight header-only wrapper around the C-Style API, using a private member to keep track of the internal HTTSCLIENT object that is acquired during the Initialize call (assuming a valid license is acquired). This HTTSCLIENT object is released along with the license when Destroy is called.
GetClientHandle can be used to obtain a reference to the underlying HTTSCLIENT object, which can then be used to call the C API functions directly, if needed.
The rest of the functions are designed to mimic their corresponding equivalents in the C API.
LVTTSClient Creates an instance of the LVTTSClient class
~LVTTSClient Closes the port and releases its resources.
Port Management Functions
Initialize Initialize an LVTTSClient object for any subsequent TTS operations.
Destroy Release resources of a TTS client object that was initialized using Initialize.
ReturnErrorString Returns a description of an error code.
Synthesis Operation Functions
Synthesize Perform the text to speech synthesis operation for the given sentence or SSML text.
SynthesizeURL Perform the text to speech synthesis operation for the given sentence or SSML text.
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
GetFloatPropertyEx Returns the specified configuration setting value for "float" type options in the associated LVTTSClient instance
GetClientFloatPropertyEx Query global configuration settings for float type options in the application.
GetIntPropertyEx Returns the specified configuration setting value for "int" type options in the associated LVTTSClient instance.
GetClientIntPropertyEx Query global configuration settings for int type options in the application.
GetStringPropertyEx Returns the specified configuration setting value for "string" type options in the associated LVTTSClient instance.
GetClientStringPropertyEx Query global configuration settings for string type options in the application.
SetPropertyEx Set optional configuration properties for the associated LVTTSClient instance.
SetClientPropertyEx Set configuration properties for all LVTTSClient instances.
Result Access Functions
GetLastSSMLError Returns a character string from the last SSML syntax error, if any.
GetLastSynthesisErrorCode Returns the last (non-SSML) TTS error code, or LV_SUCCESS if no error is recorded.
GetSSMLMarksCount Returns the number of text-to-speech SSML marks available in the active synthesis result.
GetSSMLMarkOffsetInBuffer Returns the offset, in bytes, to the beginning of the specified SSML mark in the synthesized audio buffer.
GetSSMLMarkName Returns the name of the specified SSML mark as a character string.
GetVisemesCount Returns the number of text-to-speech visemes available in the active synthesis result.
GetVisemeOffsetInBuffer Returns the offset, in bytes, to the beginning of the specified viseme in the synthesized audio buffer.
GetVisemeName Returns the name of the specified viseme as a character string.
GetSynthesizedAudioBuffer Read all, or some portion of the synthesized audio buffer that was obtained from a LVTTSClient::Synthesize or LVTTSClient::SynthesizeURL call.
GetSynthesizedAudioBufferLength Returns the size, in bytes, of the synthesized audio buffer that was produced from a previous LVTTSClient::Synthesize or LVTTSClient::SynthesizeURL call.
GetSynthesizedAudioFormat Returns the sound format of the synthesized audio from the last call to LVTTSClient::Synthesize or LVTTSClient::SynthesizeURL.
GetSynthesizedAudioSampleRate Returns the sample rate (in Hz) of the synthesized audio from the last call to LVTTSClient::Synthesize or LVTTSClient::SynthesizeURL.
JumpToSSMLMark Move the buffer offset to the beginning of the specified SSML mark so that the next call to GetSynthesizedAudioBuffer returns samples starting at that offset.
RewindBuffer Reset the buffer read offset so that the next invocation of GetSynthesizedAudioBuffer starts from the first sample in the buffer
AddEvent Allows "events" to be added to call log files.
AddFieldToRequest Adds a custom string to a named field in the call log file, that can be used to filter or identify certain calls.
GetCallGuid Query the ID used in call logging. It can be used in conjunction with SetCustomCallGuid to link events across ASR ports and TTS ports to the same call log.
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.
IsServerAvailable Returns a value based on whether there are any connected TTS servers available.
GetClientHandle Returns a handle to the underlying TTS client port.