ISpSREngine::SetAdaptationData (Windows CE 5.0)

Send Feedback

This method provides the SR engine with text data from the application for language-model adaptation purposes. SAPI calls this method when an application calls ISpRecoContext::SetAdaptationData. The engine can either persist the adaptation in the current engine recognition context or reset it every session. If the engine does not support the requested type of adaptation, it does nothing in this method and return S_OK.

Some engines can take considerable processing time to do language model adaptation. Thus, applications should submit adaptation data in chunks to the engine. The engine can fire an SPEI_ADAPTATION event to indicate when it finishes a data chunk and is ready to receive more adaptation data.

HRESULT SetAdaptationData(  void* pvEngineContext,  const WCHAR* pAdaptationData,  const ULONG cch);

Parameters

  • pvEngineContext
    [in] Pointer to the engine recognition context.
  • pAdaptationData
    [in] Pointer to the adaptation data. The application should copy the data before calling this method.
  • cch
    [in] Size, in bytes, of the adaptation data specified by pAdaptationData.

Return Values

The following table shows the possible return values.

Value Description
S_OK Function completed successfully.
FAILED(hr) Appropriate error message.

Requirements

OS Versions: Windows CE .NET 4.1 and later.
Header: Sapiddk.h, Sapiddk.idl.
Link Library: Sapilib.lib.

See Also

ISpSREngine | SAPI Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.