IVCmdAttributes::SRModeSet
This method sets the speech-recognition mode used by a voice command site.
Syntax
HRESULT SRModeSet( GUID gMode);
Parameters
- gMode
- [in] Globally unique identifier (GUID) of the speech-recognition mode to set for the site. If the mode does not exist, an error is returned and the mode is not changed.
Return Values
- NOERROR
- The method successfully set the speech-recognition mode.
- E_INVALIDARG
- The argument is invalid.
- VCMDERR_INVALIDMODE
- No site exists, the site does not support this attribute, or the voice command object is already registered with a site.
- VCMDERR_NOTSUPPORTED
- The function is not supported by the engine.
- VCMDERR_OUTOFMEM
- There is no more memory.
- VCMDERR_VALUEOUTOFRANGE
- The value is out of range.
Remarks
The speech-recognition mode for a site is saved between uses of the site, even if the user shuts down the computer in the meantime.
If a voice navigation application is installed on the user’s computer, an application may not need to set the speech-recognition mode.
An application can use a speech-recognition enumerator to determine which speech-recognition modes are available.
For Auto PC, there is usually only one speech recognition mode.