IVCmdAttributes::ThresholdSet

This method sets the threshold level for the speech-recognition engine used by a voice command site.

Syntax

HRESULT ThresholdSet( DWORD dwThreshold);

Parameters

dwThreshold
[in] Specifies the threshold level. An application can specify SRATTR_MINTHRESHOLD and SRATTR_MAXTHRESHOLD for minimum and maximum allowable values.

Return Values

NOERROR
The method successfully set the threshold level for the speech-recognition engine.
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 threshold level is a value from 0 to 100 that indicates the point below which an utterance is rejected as unrecognized. A threshold level of 0 indicates that the engine should match any utterance to the closest phrase match. A value of 100 indicates that the engine should be absolutely certain that an utterance is the recognized phrase. If the value is out of range for the engine, an error is returned and the attribute is not changed.

The threshold 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 threshold.