ISpSREngine::SetAdaptationData (SAPI 5.3)
Microsoft Speech API 5.3
ISpSREngine::SetAdaptationData
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
);
Parameters
- pvEngineContext
[in] Engine's recognition context pointer for the context that is sending the data. - pAdaptationData
[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. - cch
[in] The size, in WCHARs, of the adaptation data in pAdaptationData.
Return values
Value |
S_OK |
FAILED(hr) |
Remarks
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.