SPPHRASEELEMENT

Microsoft Speech SDK

The Microsoft.com Speech website Microsoft Speech SDK SAPI 5.1

SPPHRASEELEMENT

SPPHRASEELEMENT contains the information for a spoken word.

typedef struct SPPHRASEELEMENT
{
    ULONG            ulAudioTimeOffset;
    ULONG            ulAudioSizeTime;
    ULONG            ulAudioStreamOffset;
    ULONG            ulAudioSizeBytes;
    ULONG            ulRetainedStreamOffset;
    ULONG            ulRetainedSizeBytes;
    const WCHAR     *pszDisplayText;
    const WCHAR     *pszLexicalForm;
    const SPPHONEID *pszPronunciation;
    BYTE             bDisplayAttributes;
    char             RequiredConfidence;
    char             ActualConfidence;
    BYTE             Reserved;
    float            SREngineConfidence;
} SPPHRASEELEMENT;

Members

ulAudioTimeOffset
This is the starting offset of the element in 100-nanosecond units of time relative to the start of the phrase.
ulAudioSizeTime
This is the length of the element in 100-nanosecond units of time.
ulAudioStreamOffset
This is the starting offset of the element in bytes relative to the start of the phrase in the original input stream.
ulAudioSizeBytes
This is the size of the element in bytes in the original input stream.
ulRetainedStreamOffset
This is the starting offset of the element in bytes relative to the start of the phrase in the retained audio stream
ulRetainedSizeBytes
This is the size of the element in bytes in the retained audio stream.
pszDisplayText
The display text for this element (e.g., ",").
pszLexicalForm
The lexical form of this element (e.g., "comma" for ",").
pszPronunciation
The pronunciation for this element as a null-terminated array of SPPHONEID.
bDisplayAttributes
A bit field of SPDISPLAYATTRIBUTES defining extra display information which the application should honor when displaying this word.
RequiredConfidence
The required confidence for this element (either SP_LOW_CONFIDENCE, SP_NORMAL_CONFIDENCE, or SP_HIGH_CONFIDENCE). If a word is prefixed with a '-' (minus), the RequiredConfidence is SP_LOW_CONFIDENCE, and '+' (plus) will set this field to SP_HIGH_CONFIDENCE (e.g., "This -is -a +test"). See Confidence Scoring and Rejection in SAPI Speech Recognition Engine Guide for additional details.
ActualConfidence
The actual confidence for this element (either SP_LOW_CONFIDENCE, SP_NORMAL_CONFIDENCE, or SP_HIGH_CONFIDENCE). This is always at least the RequiredConfidence. See Confidence Scoring and Rejection in SAPI Speech Recognition Engine Guide for additional details.
Reserved
Reserved for future use.
SREngineConfidence
The confidence score computed by the SR engine. The value range is engine dependent. It can be used to optimize an application's performance with a specific engine. Using this value will improve the application with a particular speech engine but more than likely will make it worse with other engines and should be used with care. This value is more useful with speaker-independent engines because it allows a large corpus of recorded usage to correctly optimize the overall accuracy of the application. See Confidence Scoring and Rejection in SAPI Speech Recognition Engine Guide for additional details.