#include <VXIrec.h>
Recognition is performed against VXIrecGrammars, abstract grammar types managed by the interface. The exact grammar formats handled are implementation dependant.
If an asynchronous problem/error occurs in the platform's recognizer, the VXI is notified through the VXIrecResult code for the current or next function call.
There is one recognizer interface per thread/line.
Public Attributes | |
VXIint32(* | GetVersion )(void) |
Get the VXI interface version implemented. | |
const VXIchar *(* | GetImplementationName )(void) |
Get the name of the implementation. | |
VXIrecResult(* | BeginSession )(struct VXIrecInterface *pThis, VXIMap *args) |
Reset for a new speaker. | |
VXIrecResult(* | EndSession )(struct VXIrecInterface *pThis, VXIMap *args) |
Performs cleanup at the end of a speaker's session. | |
VXIrecResult(* | LoadGrammarURI )(struct VXIrecInterface *pThis, const VXIMap *properties, const VXIchar *type, const VXIchar *uri, const VXIMap *uriArgs, VXIrecGrammar **gram) |
Load a grammar from a URI, typically non-blocking. | |
VXIrecResult(* | LoadGrammarString )(struct VXIrecInterface *pThis, const VXIMap *properties, const VXIchar *type, const VXIchar *gramDef, VXIrecGrammar **gram) |
Load an inline grammar, typically non-blocking. | |
VXIrecResult(* | ActivateGrammar )(struct VXIrecInterface *pThis, const VXIMap *properties, VXIrecGrammar *gram) |
Activate a loaded VXIrecGrammar for subsequent recognition calls. | |
VXIrecResult(* | DeactivateGrammar )(struct VXIrecInterface *pThis, VXIrecGrammar *gram) |
Deactivate a loaded VXIrecGrammar for subsequent recognition calls. | |
VXIrecResult(* | FreeGrammar )(struct VXIrecInterface *pThis, VXIrecGrammar **gram) |
Free a loaded grammar. | |
VXIrecResult(* | Recognize )(struct VXIrecInterface *pThis, const VXIMap *properties, VXIrecRecognitionResult **recogResult) |
Recognize against the currently active grammars. | |
VXIrecResult(* | Record )(struct VXIrecInterface *pThis, const VXIMap *properties, VXIrecRecordResult **recordResult) |
Record audio content. | |
VXIrecResult(* | GetMatchedGrammar )(struct VXIrecInterface *pThis, const VXIchar *grammarID, const VXIrecGrammar **gram) |
GetMatchedGrammar returns grammar for ID in recognition result. | |
VXIrecResult(* | LoadGrammarOption )(struct VXIrecInterface *pThis, const VXIMap *properties, const VXIVector *gramChoices, const VXIVector *gramValues, const VXIVector *gramAcceptance, const VXIbool isDTMF, VXIrecGrammar **gram) |
LoadGrammarOption may build a grammar for a VXML <option> element. | |
VXIrecResult(* | HotwordTransfer )(struct VXIrecInterface *pThis, struct VXItelInterface *tel, const VXIMap *properties, const VXIchar *transferDest, VXIrecTransferResult **transferResult) |
HotwordTransfer provides for recognition terminated transfer. | |
VXIbool(* | SupportsHotwordTransfer )(struct VXIrecInterface *pThis, const VXIMap *properties, const VXIchar *transferDest) |
Returns whether the platform supports Hotword Transfers. |
|
Activate a loaded VXIrecGrammar for subsequent recognition calls. Multiple grammars may be activated before invoking Recognize( ). Once this returns, the grammar must be fully loaded and ready for recognition. See also LoadGrammarURI( ).
|
|
Reset for a new speaker. This must be called for each new caller, allowing for caller-specific recognition adaptation to occur.
|
|
Deactivate a loaded VXIrecGrammar for subsequent recognition calls. Deactivate a grammar on this interface which should be used by one line. Subsequent recognitions will not use this grammar in the recognition.
|
|
Performs cleanup at the end of a speaker's session. This must be called at the termination of a call, allowing for call specific termination to occur. For some implementations, this can be a no-op. For others runtime resources may be released or other adaptation may be completed.
|
|
Free a loaded grammar. Signals that the grammar is no longer needed. The implementation can recover resources as it sees fit.
|
|
Get the name of the implementation.
|
|
GetMatchedGrammar returns grammar for ID in recognition result. An XML result returned by a successful recognition contains a string identifying the matched grammar. This function is use to map that string back to the corresponding VXIrecGrammar.
|
|
Get the VXI interface version implemented.
|
|
HotwordTransfer provides for recognition terminated transfer. Called by the interpreter to perform a bridged transfer. If a platform returns VXIrec_RESULT_UNSUPPORTED, indicating that hotword recognition is not supported during this transfer, the interpreter will call VXItelInterface::TransferBridge.
|
|
LoadGrammarOption may build a grammar for a VXML <option> element. VoiceXML 2.0 requires support for the SRGS XML format but provides no standard for building semantic results inside the grammar. The <option> element is unique in that it requires this mapping. The interpreter will invoke this function to build each option grammar. For each <field>, LoadGrammarOption may be called once for speech grammars and once for DTMF grammars.
|
|
Load an inline grammar, typically non-blocking. Initiates grammar creation from a string inlined in the VoiceXML page. As with URIs, the resulting grammar must be activated before use and creation may be either synchronous or asynchronous. See LoadGrammarURI( ). The supported grammar formats are determined by the implementor, but support for a minimal JSGF fragment of the following form is required: "vocab_item {value} | vocab_item {value} | vocab_item" This format is used by the VoiceXML interpreter for <field> and in some other cases.
|
|
Load a grammar from a URI, typically non-blocking. Initiates grammar creation from a URI (Universal Resource Identifier). The resulting grammar must be activated before use. This allows for multiple grammars to be loaded when the page is read. Grammar creation may proceed either synchronously or asynchronously, but must be available once ActivateGrammar( ) returns. The supported grammar formats are determined by the implementor, but certain VoiceXML built-in types (e.g., grammar src=builtin:grammar/digits?length=5) must be supported.
|
|
Recognize against the currently active grammars. Blocks until recognition completes (possibly unsuccessfully), DTMF input completes, a timeout occurs, or an error occurs. Recognition results are returned in a structure. All activated grammars are deactivated after the recognition.
|
|
Record audio content. Blocks until termination input occurs, a timeout occurs, or an error occurs. Record results are returned in a structure.
|
|
Returns whether the platform supports Hotword Transfers.
|