Share via


ISpSREngine::SetRecoProfile

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

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.

Syntax

HRESULT SetRecoProfile(
  ISpObjectToken* pProfile
);

Parameters

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

Return Value

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

Header sapiddk.h, sapiddk.idl
Library sapilib.lib
Windows Embedded CE Windows CE .NET 4.1 and later

See Also

Reference

ISpSREngine
SAPI Interfaces