IVCmdAttributes::ThresholdGet

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

Syntax

HRESULT ThresholdGet( DWORD *pdwThreshold);

Parameters

pdwThreshold
[out] Pointer to a DWORD that receives the threshold level.

Return Values

NOERROR
The method successfully retrieved the threshold level of 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.

Remarks

The threshold level is a value from 0 to 100 that indicates the point below which an engine rejects an utterance as unrecognized. A value 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. For example, suppose the engine is expecting “What is the time?” If the threshold is 100 and the user mumbles “What’z tha time” or has a cold, the command may not be recognized. However, if the threshold is too low and the user says a similar-sounding phrase that is not being listened for, such as “What is mine?,” the engine may recognize it as “What is the time?”

If the command spoken by the user is not close enough to what the speech-recognition engine expects, the voice command object notifies the application that the command was not recognized by calling IVCmdNotifySink::CommandOther with a NULL string.

The threshold for a site is saved between uses of the site, even if the user shuts down the computer in the meantime.