Partager via


SPPHRASERULE

This structure contains the information for a rule in a grammar result. SAPI uses the pFirstChild and pNextSibling members to represent the parse tree. SPPHRASERULE represents the root node of the parse tree.

struct tagSPPHRASERULE{
  const WCHAR* pszName;
  ULONG ulId;
  ULONG ulFirstElement;
  ULONG ulCountOfElements;
  const SPPHRASERULE* pNextSibling;
  const SPPHRASERULE* pFirstChild;
  float SREngineConfidence;
  signed char Confidence;
};

Members

  • pszName
    Pointer to the name of the rule. This is in Speech Text Grammar format and is set using <RULE NAME="MyName">.
  • ulId
    Identifier of the rule. This value is set using <RULE ID="123">.
  • ulFirstElement
    Index of the first spoken element (word) of the rule.
  • ulCountOfElements
    Number of spoken elements (words) to which the rule refers.
  • pNextSibling
    Pointer to an SPPHRASERULE structure for the next sibling in the parse tree.
  • pFirstChild
    Pointer to an SPPHRASERULE structure for the first child node in the parse tree.
  • SREngineConfidence
    Engine-specific confidence for the rule. The value is engine-dependent and is not standardized across multiple SR engines.
  • Confidence
    SAPI-specific confidence value for the rule. Possible values are SP_LOW_CONFIDENCE, SP_NORMAL_CONFIDENCE, and SP_HIGH_CONFIDENCE.

Requirements

OS Versions: Windows CE .NET 4.1 and later.
Header: Sapi.h, Sapi.idl.

See Also

SAPI Structures

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.