saiAddSpeakItem

Adds a specified speak rule to the end of a specified speak list.

Prototype

DWORD saiAddSpeakItem ( void *speakList, SAI_SPEAK_DATA_TYPE dataType, char *speakItem )

Argument

Description

speakList

Pointer to a speak list to which to add the speak rule.

dataType

Payload data type. The following list shows supported speak data types and their associated numeric values:

  • SAI_SPEAK_DATA_TYPE_URL [0]: Data in URL format.

  • SAI_SPEAK_DATA_TYPE_XML [1]: Data in XML format.

  • SAI_SPEAK_DATA_TYPE_PLAIN_TEXT [2]: Data in non-formatted plain text format.

  • SAI_SPEAK_DATA_TYPE_DATA_LIST [3]: Data is a list of speak rules.

speakItem

Pointer to a speak rule to add.


Return values

Return value

Description

SUCCESS

 

SAIERR_INVALID_PARAMETER

One of the specified arguments is invalid.

SAIERR_LIST_NOT_INITIALIZED

Specified list pointer is not initialized.

SAIERR_NOT_ENOUGH_MEMORY

Specified list is not large enough to accommodate the specified speak rule.


Details

saiAddSpeakItem builds the speak list used by saiSpeakSynthesizer.

Applications must initialize the specified speak list (speakList) with saiInitSpeakList before invoking saiAddSpeakItem. If the specified speakList is not initialized, the SAI service returns SAIERR_LIST_NOT_INITIALIZED.

For more information, refer to Creating a synthesizer speak list.