You are reading help file online using chmlib.com
|
ISpSRAlternates::Commit instructs the alternate analyzer to update the speech recognition (SR) engine's acoustic and/or language model based on the selected alternate phrase, versus the original phrase.
SAPI calls Commit when an application calls ISpPhraseAlt::Commit. The alternate analyzer compares the original phrase (see SPPHRASEALTREQUEST.pPhrase) and the new alternate phrase (see SPPHRASEALT) to improve recognition accuracy.
Depending on the manufacturer, the SR engine might provide a custom related data block (see SPPHRASEALTREQUEST.pvResultExtra) so that the analyzer can synchronize the data block with the new alternate phrase. If the user wants to re-analyze the new phrase (after being serialized and deserialized), or if the user chooses a different alternate, SAPI provides the revised data block to the analyzer.
The alternate analyzer communicates with the SR engine by retrieving the ISpRecoContext interface from the SPPHRASEALTREQUEST.pRecoContext field, and querying (see IUnknown::QueryInterface) for the SR engine's private extension (see ISpPrivateEngineCall).
HRESULT Commit(
SPPHRASEALTREQUEST *pAltRequest,
SPPHRASEALT *pAlt,
void **ppvResultExtra,
ULONG *pcbResultExtra
);
Value | Description |
---|---|
S_OK | Function completed successfully. |
FAILED (hr) | Appropriate error message. |
You are reading help file online using chmlib.com
|