다음을 통해 공유


ISpSREngine::SetRecoProfile (Windows CE 5.0)

Send Feedback

This method passes the current active recognition profile to the SR engine. If the engine does not allow recognition profile changes during recognition, this method fails gracefully (for example, returns SPERR_ENGINE_BUSY). SAPI does not restrict applications from calling ISpRecognizer::SetRecoProfile during the middle of recognition. See ISpSREngine::RecognizeStream.

HRESULT SetRecoProfile(  ISpObjectToken* pProfile);

Parameters

  • pProfile
    [in] Pointer to an object implementing ISpObjectToken that contains the recognition profile information.

Return Values

The following table shows the possible return values.

Value Description
S_OK Function completed successfully.
E_INVALIDARG The pProfile parameter is not a valid ISpObjectToken interface pointer.
FAILED(hr) Appropriate error message.

Remarks

Engines can query a recognition profile token and include any information needed about this profile (for example, enrollment or training information). Engine-specific information should be stored in a subkey of the recognition profile token named with the engine class ID. This is to avoid conflicts with other engines using the same profile.

Recognition profiles are added or removed using the Speech Control Panel. To support user enrollment, for example, an engine can implement a UI component with the name "UserTraining." To instantiate this UI, the user will choose Train Profile in the Speech Control Panel on the SR tab.

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.