You are reading help file online using chmlib.com
|
ISpSREngine::SetRecoProfile passes the current active user profile to the engine.
HRESULT SetRecoProfile(
ISpObjectToken *pProfile
);
Value | Description |
---|---|
S_OK | Function completed successfully. | E_INVALIDARG | The pProfile parameter is not a valid ISpObjectToken interface pointer. |
FAILED(hr) | Appropriate error message. |
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).
You are reading help file online using chmlib.com
|