Share via


SrgsItem.Weight Property

Gets or sets a multiplying factor that adjusts the likelihood that an item within a list will be spoken.

Namespace: Microsoft.Speech.Recognition.SrgsGrammar
Assembly: Microsoft.Speech (in microsoft.speech.dll)

Syntax

'Declaration

Property Value

The weight, as a floating point value, that adjusts the likelihood of this item being spoken.

Exceptions

Exception type Condition
ArgumentOutOfRangeException

An attempt is made to set Weight to a negative value.

Remarks

The default value of this property is 1.0, which is equivalent to no weighting of the item. A weight greater than 1.0 positively biases the likelihood that the item will be spoken, and a weight less than 1.0 negatively biases the likelihood that the item will be spoken.

This property is relevant only to items within an SrgsOneOf list; it is ignored in all other cases.

Thread Safety

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

See Also

Reference

SrgsItem Class
SrgsItem Members
Microsoft.Speech.Recognition.SrgsGrammar Namespace