Microsoft Speech Platform
SPPHRASEPROPERTY
SPPHRASEPROPERTY stores the information for one semantic property. It can be used to construct a semantic property tree.
See also Designing Grammar Rules for more information about semantic properties.
typedef [restricted, hidden] struct SPPHRASEPROPERTY SPPHRASEPROPERTY;
// For SRGS grammars, this enum indicates how to use the union.
typedef [hidden] enum SPPHRASEPROPERTYUNIONTYPE
{
SPPPUT_UNUSED = 0,
SPPPUT_ARRAY_INDEX // The union contains usArrayIndex.
} SPPHRASEPROPERTYUNIONTYPE
struct SPPHRASEPROPERTY
{
LPCWSTR *pszName;
ULONG ulId;
union
{
ULONG ulId;; // For SAPI grammars, indicates the property ID, if specified.
struct
{
byte bType;
byte bReserved;
unsigned short usArrayIndex;
};
};
LPCWSTR *pszValue;
VARIANT vValue;
ULONG ulFirstElement;
ULONG ulCountOfElements;
const SPPHRASEPROPERTY *pNextSibling;
const SPPHRASEPROPERTY *pFirstChild;
float SREngineConfidence;
signed char Confidence;
};
Members
- pszName
- Name of the null-terminated string of the semantic property (in the Speech Text Grammar Format set using the PROPNAME attribute).
- ulId
- The identifier of the semantic property (in the Speech Text Grammar Format set using the PROPID attribute).
- bType
- SPPHRASEPROPERTYUNIONTYPE indicating how to use the union.
- bReserved
- Reserved.
- usArrayIndex
- For W3C grammars, indicates the array index, if this is an array element. Array elements have the name "item".
- pszValue
- Null-terminated string value of the semantic property (in the Speech Text Grammar Format set using the VALSTR attribute).
- vValue
- VARIANT value of a semantic property. The type has to be on of the following: VT_BOOL, VT_I4, VT_R4, VT_R8, or VT_BYREF (only for dynamic grammars). This is set using the VAL attribute in the Speech Text Grammar Format.
- ulFirstElement
- The first spoken element spanned by this property.
- ulCountOfElements
- The number of spoken elements spanned by this property.
- pNextSibling
- Pointer to next sibling in property tree.
- pFirstChild
- Pointer to the first child of this semantic property.
- SREngineConfidence
- Confidence value for this semantic property computed by the SR engine. The value range is specific to each SR engine.
- Confidence
- Confidence value for this semantic property computed by SAPI. The value is either SP_LOW_CONFIDENCE, SP_NORMAL_CONFIDENCE, or SP_HIGH_CONFIDENCE.