Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SPPHRASEALT (SAPI 5.4)

Speech API 5.4
Microsoft Speech API 5.4

SPPHRASEALT

SPPHRASEALT is used by SAPI and the speech recognition (SR) engine's alternate analyzer to exchange alternate information.

When a speech recognition application requests phrase alternates from the SR engine (see ISpRecoResult::GetAlternates), SAPI passes an empty SPPHRASEALT structure to the alternate analyzer (see ISpSRAlternates::GetAlternates). If it can generate alternate phrases based on the application's request (see SPPHRASEALTREQUEST), the alternate analyzer must fill in the SPPHRASEALT structure and return it to SAPI. SAPI will return the alternate phrases to the application as an array of pointers to ISpPhraseAlt interfaces.If the application selects an alternate as the preferred phrase (see ISpPhraseAlt::Commit), then SAPI will pass the respective SPPHRASEALT structure back to the alternate analyzer to update the language or acoustic models (see ISpSRAlternates::Commit).

typedef struct tagSPPHRASEALT
{
   ISpPhraseBuilder   *pPhrase;
   ULONG               ulStartElementInParent;
   ULONG               cElementsInParent;
   ULONG               cElementsInAlternate;
   void               *pvAltExtra;
   ULONG               cbAltExtra;
} SPPHRASEALT;

Members

pPhrase
The alternate phrase.
ulStartElementInParent
The index of the starting element for the change in the original phrase.
cElementsInParent
The number of elements in the original recognition.
cElementsInAlternate
The number of elements that are changed in the alternate.
pvAltExtra
A pointer to the private SR engine alternate analyzer data. Can be NULL if no data is provided.
cbAltExtra
The size of the private SR engine alternate analyzer data. Can be zero if no data is provided.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.