Note
Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.
SPGRAMMAROPTIONS
Microsoft Speech Platform
Specifies the types of grammar options in a recognition context.
SPGRAMMAROPTIONS is a bit-field and hence can be combined into a DWORD using a bit-wise OR.
<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>typedef enum SPGRAMMAROPTIONS</strong> <strong>{</strong> <strong>SPGO_SRGS,</strong> <strong>SPGO_SRGS_SCRIPT,</strong> <strong>SPGO_FILE,</strong> <strong>SPGO_HTTP,</strong> <strong>SPGO_RES,</strong> <strong>SPGO_OBJECT,</strong> <strong>SPGO_DEFAULT,</strong> <strong>SPGO_ALL</strong> <strong>} SPGRAMMAROPTIONS</strong>; </pre>
Elements
- SPGO_SRGS
Enables support for the W3C SRGS grammar XML format. - SPGO_SRGS_SCRIPT
Enables support for SRGS grammars to contain Jscript for semantic interpretation. - SPGO_FILE
Grammars can be loaded from local and UNC file paths. - SPGO_HTTP
Grammars can be loaded from HTTP and HTTPS URLs. - SPGO_RES
Referenced grammars can be imported from a resource. This ONLY applies to referenced grammars (for example, those loaded by the ruleref tag). This flag has absolutely no effect on the LoadCmdFromResource function. - SPGO_OBJECT
Referenced grammars can be imported from a COM object. This ONLY applies to referenced grammars. This flag has absolutely no effect on the LoadCmdFromObject function. NOTE: The SRGS implementation has no means of referencing grammars in COM objects. This feature is only used with grammars that are built at runtime by calling Speech Platform functions. - SPGO_DEFAULT
By default, all options are enabled except scripting in SRGS. - SPGO_ALL
All options are enabled.