Browse
 
Tools
Rss Categories

LVTTSClient::WaitForSynthesis

Reference Number: AA-01045 Views: 9703 0 Rating/ Voters

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

Function

  • LV_TTS_RETURN_CODE WaitForSynthesis(unsigned int timeout_ms)

Parameters

timeout_ms

Duration (in milliseconds) to wait for the TTS server's response.

Return Values

LV_SUCCESS

No errors; synthesis' results are now available.

LV_INVALID_TTS_HANDLE

The TTS client handle is invalid (either Initialize has not been called or Destroy has already been called).

LV_TIME_OUT

The specified timeout_ms period elapsed first.

LV_SSML_ERROR

The supplied SSML had syntax error(s).

LV_RESOURCE_ERROR

The TTS server is out of resources, or no voices have been loaded.

LV_FAILED_NO_VOICE_SPECIFIED

There was an error in the request, no voices were specified.

LV_FAILED_VOICE_LOAD

The TTS server failed to load one or more of the needed voices.

LV_FAILED_SYNTHESIS

The input was neither plain text nor SSML; or conversion of supplied SSML to UTF-8 format failed.

LV_FAILED_STREAMER

An exception occurred on the TTS server while processing the supplied SSML.

LV_FAILED_AUDIO_CONVERSION

Conversion of the synthesized audio to the requested sound format and/or sampling rate has failed.

LV_EXCEPTION

An exception occurred while processing the request.

Remarks

When the call returns LV_TIME_OUT, it does not mean that the synthesis has failed. You may need to wait further (again) for the results.