Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
::SetRecoProfile

ISpSREngine::SetRecoProfile (SAPI 5.3)

Speech API 5.3
Microsoft Speech API 5.3

ISpSREngine::SetRecoProfile

ISpSREngine::SetRecoProfile passes the current active user profile to the engine. 

HRESULT SetRecoProfile(
   ISpObjectToken   *pProfile
);

Parameters

pProfile
Address of an ISpObjectToken object that contains the recognition profile token information.

Return values

ValueDescription
S_OKFunction completed successfully.
E_INVALIDARGThe pProfile parameter is not a valid ISpObjectToken interface pointer.
FAILED(hr)Appropriate error message.

Remarks

RecoProfiles are added or removed using Speech properties in Control Panel.

Engines can query the 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.

In order to provide user enrollment the engine can implement a UI component with the name "UserTraining." To instantiate, click Control Panel->Speech properties->SR tab->Train Profile.

SAPI does not restrict applications from calling ISpRecognizer::SetRecoProfile during the middle of recognition (see ISpSREngine::RecognizeStream). If an SR engine does not allow recognition profile changes during recognition, it should fail the ::SetRecoProfile call gracefully (e.g., return SPERR_ENGINE_BUSY).

Show:
© 2015 Microsoft