Creates a TTS client object that is necessary to perform any TTS operations. This object acts as a connection from the TTS client application to the TTS server. If NULL values are passed, it will pull the values from the config file (client_property.conf) according to what the user has configured. If there are no configuration values set in the file, then it will attempt to use system defaults. See Using Visemes with TTS for an example.
- HTTSCLIENT LV_TTS_CreateClient(const char * lang_code, const char * gender, const char * speaker_name, unsigned int sampling_rate, LV_TTS_RETURN_CODE * error_return_code);
The language of the voice that is to be used for synthesis.
See LumenVox TTS Voices for a complete list of available lang_code options
The default gender of the voice that is to be used for synthesis. If speaker_name is not NULL, the gender of the chosen speaker will override this setting. Possible values are "Male" and "Female".
Specify the name of the speaker whose voice is to be used for synthesis. If NULL, a general voice for the specified gender will be used.
See LumenVox TTS Voices for a complete list of available speakers
The sampling rate (in Hz) the synthesized audio is expected to be produced in.
In most cases, this should be set to a value of 8000 (representing the default 8 KHz)
If you have purchased 22 kHz licenses and wish to use them, the sampling_rate value to use here should be 22050
A variable that would contain a code representing the reason for failure. Passing in NULL (if you do not care to know the reason for failure) does not affect the functioning.
Creation of a TTS client handle succeeded
Creation of a TTS client handle failed
Possible values returned with error_return_code
No errors; the call succeeded.
One or morespecified parametersto the call are invalid.
None of the connected TTS servers carry a voice corresponding to the requested features.
Acquiring of a license matching the input voice specifications failed.
An exception occurred while processing the request.
The above inputs to the call only specify the defaults. If the input for synthesis is an SSML document, any additionally required voices are loaded automatically (if available).
Upon call failure, you must inspect the value returned in error_return_code to determine the reason for the failure. View the Error Codes article for more details.
The handle returned in a successful call is used in most other API functions. When done with, it must be released by calling LV_TTS_DestroyClient to release the acquired license and free up other associated resources.