TtsProcessWithParams

Convert input text data into speech, while optionally setting TTS engine instance parameters to a specified value for just this speak request.

Use the pSpeakData argument to describe the input data properties. (The output data has the previously specified output format.)

TTSRETVAL TtsProcessWithParams(
 HTTSINSTANCE hTtsInst,
 const char * const * pszParams,
 const char * const * pszValues,
 LH_U32 cParams)
 const TTS_SPEAK_DATA* pSpeakData)

Argument

Description

hTtsInst

[in] Handle to a TTS engine instance

pszParams

[in] List of parameters to set; NULL if there are no parameters to set. Each element in this array specifies a NULL-terminated character string for the individual parameter to set. For convenience and to avoid application bugs, the Vocalizer API headers provide #defines for each of the valid parameter names.

pszValues

[in] List of parameter values to set; NULL if there are no parameters to set. Each element in this array specifies a NULL-terminated character string for the individual parameter value to set, where pszValues[index] is the value for parameter pszParams[index].

cParams

[in] Number of parameters to set; can be 0 if there are no parameters to set.

pSpeakData

[in] Pointer to TTS_SPEAK_DATA typed structure, which describes where to find the input data for text to speech and its properties. For details, see TTS_SPEAK_DATA.

To use the source callback, specify NULL for the input members (uri and data) of the structure.

Use this function when each speak request can have different parameters. Use it to set parameters for the current speak request. (In contrast, TtsSetParamsEx set values that persist for future speak requests.)

If a parameter is set by both TtsProcessWithParams and the session.xml for TtsSessionStartEx, the value from the most recent of these function calls has precedence.

This function uses the TTS_SPEAK_DATA structure to determine the TTS input method:

  1. If the uri member has a non-NULL value, use the specified URI.
  2. If the data member has a non-NULL value, use the specified buffer.
  3. If both uri and data are NULL, use the source callback function of type TTS_SOURCE_CB.