Prosody speech processing: API: sm_add_input_vocab

This function is deprecated.

Prototype Definition

int sm_add_input_vocab(struct sm_input_vocab_parms *vocabp)

Parameters

*vocabp
a structure of the following type:
typedef struct sm_input_vocab_parms {
	tSMModuleId module;					/* in */
	char *filename;						/* in */
	tSM_UT32 item_id;					/* out */
} SM_INPUT_VOCAB_PARMS;

Description

Download an ASR vocabulary item to the specified module module. The vocabulary is contained in the file whose name is referenced by filename. The file must be in ".sas" format.

When this ASR vocabulary item is to be included in the active vocabulary for a specific channel, the returned vocabulary identifier item_id should be included in the list of identifiers specified in a call to sm_asr_listen_for() for that channel.

If the specified vocabulary item has already been loaded onto the specified module, no loading takes place, but item_id is returned with the same value returned by the call to sm_add_input_vocab() which performed the original loading operation. This allows separate applications to make use of the same module without explicitly co-ordinating their vocabulary requirements. Note that the item_id is local to the process invoking sm_add_input_vocab(). Requires the module iwr to have been downloaded.

Fields

module (Deprecated)
The module whose vocabulary is to be amended.
filename (Deprecated)
The name of the file containing a vocabulary item.
item_id (Deprecated)
The identifier which can be used later to refer to this item.

Returns

0 if call completed successfully, otherwise a standard error such as:


This function is part of the Prosody speech processing API.