ISpSREngine::SetAdaptationData (SAPI 5.3)
ISpSREngine::SetAdaptationData provides the SR engine with text data from the application for language-model adaptation purposes. This method is called when an application calls ISpRecoContext::SetAdaptationData. If the engine does not support this type of adaptation, it should do nothing in this function and return S_OK.
HRESULT SetAdaptationData( void *pvEngineContext, const WCHAR *pAdaptationData, const ULONG cch );
- [in] Engine's recognition context pointer for the context that is sending the data.
- [in] Buffer containing the adaptation data. Applications should copy this data before returning from this function if they are going to use this data. This buffer is not necessarily null-terminated.
- [in] The size, in WCHARs, of the adaptation data in pAdaptationData.
|S_OK||Function completed successfully.|
|FAILED(hr)||Appropriate error message.|
Some engines may take considerable processing time to perform language model adaptation. Thus, applications should submit adaptation data in chunks to the engine. The engine can then fire an event SPEI_ADAPTATION to indicate that it can receive more adaptation data.
Engines can either persist the adaptation in the current RecoProfile or reset it every session.