This chapter lists and describes the function calls that retrieve data from reply messages. These function calls do not interact with the engine; they provide local access to the logical contents of a message that has already been received.
Purpose
SmGetAlphabets retrieves a list of alphabets related to specific enroll IDs or tasks.
SmGetAlphabets retrieves a list of alphabet strings. This function can extract data from the following reply message structures:
The alphabet identifies the base technology used in the engine. Enrollment data must match engine technology. The current engine is using a ranks based technology (alphabet="R".). The previous engine used a Z-label based technology (alphabet="Z".).
Syntax
int SmGetAlphabets (SM_MSG reply, unsigned long *nalphabets, char ***alphabets);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmQueryEnrollIds SmQueryTasks
Purpose
SmGetAlternates retrieves alternative words.
SmGetAlternates retrieves the list of alternative words from the reply message. This function can extract data from the following reply message structures:
Syntax
int SmGetAlternates (SM_MSG reply, unsigned long *nwords, SM_WORD **words);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmQueryAlternates
Purpose
SmGetAnnotations retrieves annotations.
SmGetAnnotations extracts the base vocabulary name from the reply message, uses this name to access the image of the private area of the FSG file, and uses the offsets stored in SM_WORD to access the annotation data. This function can extract data from the following reply message structures:
Annotations are stored in an SM_ANNOTATION structure. SmGetAnnotations returns a pointer to this structure. SM_ANNOTATION is defined as :
struct _SM_ANNOTATION ( long type; // Type of annotation union { long numeric; // Return numeric annotations char *string; // Return string annotations void *other; // Reserved } annodata; );
Types of annotations are defined as :
The SM_ANNOTATION structure has a one-to-one correspondence with the corresponding SM_WORD structure. Lack of an annotation on a particular word is indicated by an annotation of type SM_ANNOTATION_NONE.
Syntax
int SmGetAnnotations (SM_MSG reply, unsigned long *nwords, SM_ANNOTATION **annotations);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_SERVER_FILE_READ_ERROR
Reply Structure - Related Functions and Callbacks
SmDefineGrammar SmUndefineVocab
Purpose
SmGetApplication retrieves the name of the application.
SmGetApplication extracts the application name from the following reply messages:
Syntax
int SmGetApplication (SM_MSG reply, char **application);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmNcommandWordCallback SmNfocusStateCallback
Purpose
SmGetApplications retrieves the names of the applications that have established a session.
SmGetApplications extracts the application names from the SM_QUERY_SESSIONS_REPLY reply message sent by the speech engine to the application.
Syntax
int SmGetApplications (SM_MSG reply, unsigned long *nsessions char ***reco_sessions);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmNquerySessionsCallback
Purpose
SmGetAudioLevel retrieves the level of the audio signal during recognition.
SmGetAudioLevel provides information about the level of audio received by the speech engine when the microphone is on. If previously requested by the SM_AUDIO_INPUT_LEVEL parameter supplied to the SmSet function, packets of audio level values are periodically sent to the speech engine, which in turn calls SmNaudioLevelCallback and/or sends a message to your window procedure. Audio-level information can then be obtained using this function. Audio-level values range from 0(SM_MIN_AUDIO_LEVEL) to 10(SM_MAX_AUDIO_LEVEL) with acceptable volume ranges from 2 to 7. The average rate sent by the engine is 5 audio-level values per second. This function can extract data from the following reply message structures:
Syntax
int SmGetAudioLevel (SM_MSG reply, short *volume);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmNaudioLevelCallback
Purpose
SmGetDescriptions retrieves a list of enrollment enroll IDs, scripts, tasks, or users.
SmGetDescriptions can extract data from the following reply message structures:
Syntax
int SmGetDescriptions (SM_MSG reply, unsigned long *ndescriptions, char ***descriptions);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmQueryEnrollIds SmQueryLanguages SmQueryTasks SmQueryUsers
Purpose
SmGetEngineState retrieves the engine state.
SmGetEngineState extracts the engine state from an SM_GET_ENGINE_STATE reply message sent by the speech engine to an application. SM_GET_ENGINE_STATE reply messages are controlled by the SM_NOTIFY_ENGINE_STATE parameter of the SmSet function.
Syntax
int SmGetEngineState (SM_MSG reply, unsigned long *engine_state);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmNengineStateCallback
Purpose
SmGetEnrollId retrieves an enrollment ID.
SmGetEnrollId is valid only for reply message structures that contain one enrollment ID. Use SmGetEnrollIds for reply message structures with multiple enrollment IDs. SmGetEnrollId can extract data from the following reply message structures:
Syntax
int SmGetEnrollId (SM_MSG reply, char **enroll_id);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmQueryDefault SmQueryEnrollIds SmQueryUserInfo SmSetUserInfo
Purpose
SmGetEnrollIds retrieves a list of enrollment IDs.
This function can extract data from the following reply message structures:
Syntax
int SmGetEnrollIds (SM_MSG reply, unsigned long *nenroll_ids, char ***enroll_ids);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmQueryEnrollIds SmQueryUserInfo SmSetUserInfo
Purpose
SmGetEventId retrieves the event ID.
SmGetEventId can extract data from the following reply message structures:
Syntax
int SmGetEventId (SM_MSG reply, unsigned long *event_id);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmEventNotify SmNeventSynchCallback
Purpose
SmGetEventOptions retrieves options for an event.
SmGetEventOptions can extract data from the following reply message structure:
Syntax
int SmGetEventOptions (SM_MSG reply, unsigned long *options);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmNeventSynchCallback
Purpose
SmGetFirmWords retrieves firm words.
SmGetFirmWords extracts the SM_WORD from the following reply message structures:
Syntax
int SmGetFirmWords (SM_MSG reply, unsigned long *nwords, SM_WORD **words);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmNrecognizedTextCallback SmNrecognizedWordCallback SmNcommandWordCallback
Purpose
SmGetFocusState retrieves the focus state.
SmGetFocusState extracts the focus state from the SM_FOCUS_STATE reply message sent by the speech engine to an application. SM_FOCUS_STATE reply messages are controlled by the SmSet SM_NOTIFY_FOCUS_STATE parameter. The name of the application causing the focus change can be extracted from SM_FOCUS_STATE with SmGetApplication.
Syntax
int SmGetFocusState (SM_MSG reply, unsigned long *focus_state);
Parameters
Return Values None.
Reply Structure - Related Functions and Callbacks
SmNfocusStateCallback
Purpose
SmGetGrammarPath retrieves the full path name of an FSG file.
SmGetGrammarPath extracts data from the following reply message structure:
Syntax
int SmGetGrammarPath (SM_MSG reply, char **grammar_path);
Parameters
Return Values
SM_RC_OK SM_RC_REPLY_NULL SM_RC_EINVAL_MSG_TYPE
Reply Structure - Related Functions and Callbacks
SmDefineGrammar
Purpose
SmGetInfirmWords retrieves infirm words.
SmGetInfirmWords can extract data from the following reply message structure:
Syntax
int SmGetInfirmWords (SM_MSG reply, unsigned long *nwords, SM_WORD **words);
Parameters
Return Values
SM_RC_OK SM_RC_REPLY_NULL SM_RC_EINVAL_MSG_TYPE
Reply Structure - Related Functions and Callbacks
SmNrecognizedTextCallback
Purpose
SmGetItemValue retrieves the value for an item.
SmGetItemValue can extract data from the following reply message structures:
Syntax
int SmGetItemValue (SM_MSG reply, unsigned long *item, unsigned long *value);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmQuery SmSet
Purpose
SmGetLanguages retrieves a list of languages.
SmGetLanguages can extract data from the following reply message structures:
Syntax
int SmGetLanguages (SM_MSG reply, unsigned long *nlanguages, char ***languages);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmQueryEnrollIds SmQueryLanguages SmQueryTasks SmConnect
Purpose
SmGetMicState gets the microphone state.
SmGetMicState extracts the microphone state from one of the following messages sent by the speech engine to the application:
Syntax
int SmGetMicState (SM_MSG reply, unsigned long *mic_state)
Parameters
SM_REPORT_ENGINE_ERROR | SM_ENGINE_MIC_ON
|
SM_FOCUS_GRANTED | SM_NOTIFY_MIC_ON
|
SM_MIC_STATE | SM_NOTIFY_MIC_ON
|
Return Values None.
Reply Structure - Related Functions and Callbacks
SmNmicStateCallback
Purpose
SmGetMsgName retrieves the name of the audio message.
SmGetMsgName can extract data from the following reply message structures:
Syntax
int SmGetMsgName (SM_MSG reply, char **message_name);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmNplayMessageStatusCallback
Purpose
SmGetMsgType retrieves the type of message from the reply structure associated with the input.
SmGetMsgType can extract data from the following reply message structures:
Syntax
int SmGetMsgType (SM_MSG reply, int *message_type);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Purpose
SmGetNameValue retrieves a name and its value.
SmGetNameValue retrieves a name (tag) of user information and its corresponding value. This function can extract data from the following reply message structures:
Syntax
int SmGetNameValue (SM_MSG reply, char **name, char **value);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmQueryUserInfo
Purpose
SmGetNumberWordMsgs gets the number of words from a message.
SmGetNumberWordMsgs retrieves the number of SM_RECOGNIZED_WORD messages that have been sent since the last SM_RECOGNIZE_NEXT_WORD function call request. The value returned is 0 or 1. This is used with a synchronous SM_HALT_RECOGNIZER_REPLY message to tell if any unprocessed command words are still queued.
Syntax
int SmGetNumberWordMsgs (SM_MSG *reply, unsigned long *nwords )
Parameters
Return Values
SM_RC_SM_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Purpose
SmGetPercentages retrieves percentages of the completeness of processing for specified enrollments.
SmGetPercentages can extract data from the following reply message structure:
A query of enrollids for a given user returns an array of enrollids, with related fields, such as language or percent complete. This procedure provides an array of the percent-complete values.
Syntax
int SmGetPercentages (SM_MSG reply, unsigned long *npercentages, short **percentages);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmQueryEnrollIds
Purpose
SmGetPhraseState retrieves phrase state flags.
SmGetPhraseState can extract data from the following reply message structure:
Syntax
int SmGetPhraseState (SM_MSG reply, unsigned long *phrase_state,
Parameters
SM_PHRASE_ACCEPTED | The engine has accepted the phrase.
|
SM_PHRASE_HALTED | The engine is in a halted state and is waiting for the application to tell
it what to do next.
|
SM_PHRASE_REJECTED | The engine has rejected the phrase, with the best guess phrase returned in
the SM_WORD array.
|
Return Values
SM_RC_OK SM_RC_REPLY_NULL SM_RC_EINVAL_MSG_TYPE
Reply Structure - Related Functions and Callbacks
SmNRecognizedPhraseCallback
Purpose
SmGetPronunciations retrieves pronunciations.
SmGetPronunciations can extract data from the following reply message structures:
Syntax
int SmGetPronunciations (SM_MSG reply, unsigned long *npronun, char ***pronuns);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmQueryPronunciations SmWordCorrection
Purpose
SmGetRc retrieves the return code for the SMAPI functions.
Syntax
int SmGetRc (SM_MSG reply, int *rc);
Parameters
Return Values
SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
All functions.
Purpose
SmGetRcDescription retrieves the ASCII string describing the return code.
SmGetRcDescription remaps return codes to ASCII strings that describe the return code and, potentially, the associated failure. Messages are in US English only for diagnostic purposes. This function returns a pointer to an ASCII character string that describes the return code in the parameter rc_description. For example, for the symbolic return code "SM_RC_ACOUSTICS_TOO_LONG", the associated return code description character string would be "The acoustics specified are too long." For a list of all return code character strings, see "SMAPI Message Explanations".
Syntax
int SmGetRcDescription (SM_MSG reply, char **rc_description);
Parameters
Return Values
SM_RC_OK SM_RC_REPLY_NULL
Purpose
SmGetRcName returns the symbolic name of the return code as a string.
SmGetRcName retrieves the ASCII strings containing the symbol associated with the return code as a string. For example, for a return code value of 49, the associated symbolic return code name character string would be SM_RC_ACOUSTICS_TOO_LONG. For a list of all return code values, see "SMAPI Return Codes and Messages".
Syntax
int SmGetRcName (SM_MSG reply, char **rc_name);
Parameters
Return Values
SM_RC_OK SM_RC_REPLY_NULL
Purpose
SmGetScripts retrieves a list of enrollment scripts.
SmGetScripts can extract data from the following reply message structures:
Syntax
int SmGetScripts (SM_MSG reply, unsigned long *nscripts, char ***scripts);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmQueryEnrollIds
Purpose
SmGetService retrieves a pointer to the argument name describing the service requested from the speech engine.
SmGetService can extract data from the following reply message structures:
Syntax
int SmGetService (SM_MSG reply, char **service);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmConnect SmDisconnect
Purpose
SmGetSessionId retrieves the session ID from the reply structure.
SmGetSessionId can extract data from the following reply message structure:
Syntax
int SmGetSessionId (SM_MSG reply, char **session_id);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmConnect
Purpose
SmGetSeverity retrieves the severity associated with an unsolicited SM_REPORT_ENGINE_ERROR message.
Syntax
int SmGetSeverity (SM_MSG reply, unsigned long *severity)
Parameters
SM_ENGINE_INFO | Informational message/can be ignored. |
SM_ENGINE_WARNING | Non-terminal error detected by engine. |
SM_ENGINE_ERROR | Currently unused, but can be used in the future. |
SM_ENGINE_TERMINAL_ERROR | Engine terminated due to unrecoverable error. |
Return Values
SM_RC_SM_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Purpose
SmGetSpeechDataArchive retrieves the name of the archive file.
SmGetSpeechDataArchive extracts data associated with the following reply message structures:
Syntax
int SmGetSpeechDataArchive (SM_MSG reply, char **archive);
Parameters
Return Values
SM_RC_OK SM_RC_REPLY_NULL SM_RC_SM_EINVAL_MSG_TYPE
Reply Structure - Related Functions and Callbacks
SmSaveSpeechData SmRestoreSpeechData
Purpose
SmGetSpeechDataOptions retrieves the options flags.
SmGetSpeechDataOptions extracts data associated with the following reply message structure:
Syntax
int SmGetSpeechDataOptions (SM_MSG reply, long *options);
Parameters
SM_NORMAL_FILE | This indicates that the speech data was written to a flat file. It will
contain only engine data.
|
SM_COMPOUND_FILE | This indicates that the speech data is written to a
file, and the data is saved in a section
named "VTDSessionArchive." The file can contain both
engine state and application state data.
|
Return Values
SM_RC_OK SM_RC_REPLY_NULL SM_RC_SM_EINVAL_MSG_TYPE
Reply Structure - Related Functions and Callbacks
SmSaveSpeechData
Purpose
SmGetSpeechDataSize retrieves the size of the speech data archive.
SmGetSpeechDataSize extracts data associated with the following reply message structures:
Syntax
int SmGetSpeechDataSize (SM_MSG reply, unsigned long *size);
Parameters
Return Values
SM_RC_OK SM_RC_REPLY_NULL SM_RC_SM_EINVAL_MSG_TYPE
Reply Structure - Related Functions and Callbacks
SmQuerySpeechData SmSaveSpeechData
Purpose
SmGetSpeechDataVersion retrieves the version identifier.
SmGetSpeechDataVersion extracts data associated with the following reply message structures:
Syntax
int SmGetSpeechDataVersion (SM_MSG reply, long *version);
Parameters
Return Values
SM_RC_OK SM_RC_REPLY_NULL SM_RC_SM_EINVAL_MSG_TYPE
Reply Structure - Related Functions and Callbacks
SmRestoreSpeechData SmSaveSpeechData
Purpose
SmGetSpelling gets the spelling from a message.
SmGetSpelling extracts data and retrieves the spelling associated with the following reply message structures:
Syntax
int SmGetSpelling (SM_MSG reply, char **spelling);
Parameters
Return Values
SM_RC_SM_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmAddPronunciation SmQueryPronunciation SmRemovePronunciation SmWordCorrection
Purpose
SmGetSpellings retrieves spellings.
SmGetSpellings extracts data and retrieves the spelling associated with the following reply message structures:
Syntax
int SmGetSpellings (SM_MSG reply, unsigned long *nspellings, char ***spellings);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmAddPronunciation SmQueryPronunciations SmRemovePronunciation SmWordCorrection
Purpose
SmGetStates retrieves enrollment statuses.
SmGetStates can extract data from the following reply message structure:
Syntax
int SmGetStates (SM_MSG reply, unsigned long *nstati, short **stati);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmQueryEnrollIds
Purpose
SmGetStatus retrieves the status.
SmGetStatus can extract data from the following reply message structures:
SM_STAT_PLAY_START | The message, utterance, or word playback started. |
SM_STAT_PLAY_STOP | The message, utterance, or word playback stopped. |
SM_STAT_BAD_AUDIO | The connection to the audio source was lost during playback. |
SM_STAT_BAD_TAG | An invalid tag value was specified for the word. |
SM_RC_ADDED | The word was added to the vocabulary. |
SM_RC_INVOCAB | The word is already in the vocabulary. |
SM_RC_NOT_INVOCAB | The word is not in the IBM VoiceType Dictation spelling dictionary. |
SM_RC_NOT_ADDED | The word has not been added to the vocabulary. |
Syntax
int SmGetStatus (SM_MSG reply, int *status);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmWordCorrection SmNplayMessageStatusCallback SmNplayUtteranceStatusCallback SmNplayWordsStatusCallback
Purpose
SmGetTags retrieves tags from the reply structure.
SmGetTags can extract data from the following reply message structures:
Syntax
int SmGetTags (SM_MSG reply, unsigned long *ntags, long **tags);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmQueryAlternates SmWordCorrection SmNplayWordsStatusCallback
Purpose
SmGetTask retrieves a domain from the reply structure.
SmGetTask is valid only for reply message structures that contain one domain. Use SmGetTasks for reply message structures with multiple domains. SmGetTask can extract data from the following reply message structures:
Syntax
int SmGetTask (SM_MSG reply, char **domain);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmQueryDefault SmQueryTasks
Purpose
SmGetTasks retrieves domains from the reply structure.
This function can extract data from the following reply message structures:
Syntax
int SmGetTasks (SM_MSG reply, unsigned long *ndomains, char ***domains);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmQueryTasks
Purpose
SmGetTimes retrieves time values of spoken words.
SmGetTimes retrieves an array of time values sent with words received in the last SM_RECOGNIZED_TEXT or SM_RECOGNIZED_WORD message from the speech engine. Each time, expressed in milliseconds, specifies the time elapsed from the beginning of the utterance to the beginning of the spoken word. This function can extract data from the following reply message structures:
Syntax
int SmGetTimes (SM_MSG reply, unsigned long *ntimes, unsigned long **times);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmNrecognizedTextCallback SmNrecognizedWordCallback SmNaudioEventCallback
Purpose
SmGetUserId retrieves a user ID from the reply structure.
SmGetUserId is valid only for reply message structures that contain one user ID. Use SmGetUserIds for reply message structures with multiple user IDs. SmGetUserId can extract data from the following reply message structures:
Syntax
int SmGetUserId (SM_MSG reply, char **user_id);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmQueryDefault SmQueryUserInfo SmQueryUsers SmSetUserInfo
Purpose
SmGetUserIds retrieves user IDs from the reply structure.
SmGetUserIds can extract data from the following reply message structures:
Syntax
int SmGetUserIds (SM_MSG reply, unsigned long *nuser_ids, char ***user_ids);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmQueryUserInfo SmQueryUsers SmSetUserInfo
Purpose
SmGetUsers retrieves users from the reply structure.
SmGetUsers can extract data from the following reply message structure:
Syntax
int SmGetUsers (SM_MSG reply, unsigned long *nusers, char ***users);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmQueryUsers
Purpose
SmGetUtteranceNumber retrieves the utterance number from the reply structure.
SmGetUtteranceNumber can extract data from the following reply message structures:
Syntax
int SmGetUtteranceNumber (SM_MSG reply, unsigned long *nutterance);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmMicOn SmNplayUtteranceStatusCallback SmNutteranceCompletedCallback
Purpose
The SmGetVocabList function retrieves a vocabulary list from the reply structure.
SmGetVocabList can extract data from the following reply message structures:
Syntax
int SmGetVocabList (SM_MSG reply, unsigned long *nvocabs, char ***vocabs);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmQueryEnabledVocabs SmQueryVocabs SmQueryWord
Purpose
SmGetVocabName retrieves the vocabulary name from the reply structure.
This function can extract data from the following reply message structures:
Syntax
int SmGetVocabName (SM_MSG reply, char **vocabname);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmAddToVocab SmDefineVocab SmDisableVocab SmEnableVocab SmRemoveFromVocab SmUndefineVocab
Purpose
SmGetVocWords retrieves vocabulary words from the reply structure.
This function can extract data from the following reply message structures:
Following an SmAddToVocab call, SmGetVocWords extracts the vocabulary words that failed to be added.
Following an SmDefineVocab call, SmGetVocWords extracts the vocabulary words that failed to be defined.
For a description of the SM_VOCWORD data type, see "Data Types".
Syntax
int SmGetVocWords (SM_MSG reply, unsigned long *nwords, SM_VOCWORD **words);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmAddToVocab SmDefineVocab
Purpose
SmGetWords retrieves words from the reply structure. SmGetWords can extract data from the following reply message structures:
Syntax
int SmGetWords (SM_MSG reply, unsigned long *nwords, SM_WORD **words);
Parameters
Return Values
SM_RC_EINVAL_MSG_TYPE SM_RC_OK SM_RC_REPLY_NULL
Reply Structure - Related Functions and Callbacks
SmQueryAddedWords SmQueryWord
Purpose
SmReturnRc returns the return code from SM_MSG.
SmReturnRc provides an alternative to SmGetRc for accessing return codes from messages received from the speech engine. The return value of the function is the return code value in the given SM_MSG.
Syntax
int SmReturnRc (SM_MSG reply);
Parameters
Return Values
SM_RC_OK SM_RC_REPLY_NULL
Task Related Functions and Callbacks
SmReturnRcDescription SmReturnRcName
Purpose
SmReturnRcDescription retrieves the ASCII string describing the return code.
SmReturnRcDescription remaps return codes to ASCII strings that describe the return code and, potentially, the associated failure. Messages are in US English only for diagnostic purposes. For example, if this function were passed the return code, SM_RC_ACOUSTICS_TOO_LONG, a pointer to the associated return code description character string "The acoustics specified are too long." would be returned. For a list of all return code character strings, see "SMAPI Message Explanations".
Syntax
char *SmReturnRcDescription (int rc)
Parameters
Task Related Functions and Callbacks
SmReturnRc SmReturnRcName
Purpose
SmReturnRcName returns the symbolic name of a return code as a string.
SmReturnRcName provides an alternative to SmGetRcName for retrieving an ASCII string containing the symbol associated with a return code. For example, if this function was passed the return code, SM_RC_ACOUSTICS_TOO_LONG, a pointer to the associated symbolic return code name character string "SM_RC_ACOUSTICS_TOO_LONG" would be returned. For a list of all return code values, see "SMAPI Return Codes and Messages".
Syntax
char *SmReturnRcName (int rc);
Parameters
Return Values
Function directly returns a pointer to a statically defined character string containing a description associated with the return code.
Refer to Appendix A. "SMAPI Return Codes and Messages" for a complete list of the character strings, their associated return values, and their symbolic return code names.
Task Related Functions and Callbacks
SmReturnRc SmReturnRcDescription