TtsGetParamEx

Retrieve the value of one parameter.

TTSRETVAL TtsGetParamEx(
 HTTSINSTANCE hTtsInst,
 const char * szParam,
 char * szValueBuf,
 LH_U32 * pcValueBuf)

Argument

Description

hTtsInst

[in] Handle to a TTS engine instance.

szParam

[in] Parameter name to retrieve, a NULL-terminated string. For convenience and to avoid application bugs, the Vocalizer API headers provide #defines for each of the valid parameter names.

szValueBuf

[out] Buffer for storing the NULL-terminated parameter value string. May be NULL with *pcValueBuf set to 0 to query the required buffer size for storing the value.

pcValueBuf

[in, out] As input, specifies the size of szValueBuf in characters, including room for the NULL terminator. If this is sufficient for storing the parameter value, on output it is updated to the actual length of the value including the NULL terminator. If this is too small for storing the parameter value, this function returns TTS_E_BUF_TOO_SMALL, with this argument updated to the required buffer size for the value including room for the NULL terminator.

SSML markup and Vocalizer control sequences can be used to set parameters from within the input text, such as the volume and rate. All changes from within the input text only affect the current speak request; they are reset at the end of the speak request. Thus if TtsGetParamEx is called while the TTS instance is idle, the returned value never reflects changes made within the input text. If TtsGetParamEx is called while synthesis is in progress, the returned value may reflect temporary changes made from within the input text, but this corresponds to the current internal state of the TTS engine, not necessarily to the next audio buffer that will be delivered.