Share via


SrgsItem.Weight 属性

定义

获取或设置可以调整 SrgsItem 对象中的 SrgsOneOf 将会被朗读的可能性的倍数因子。

public:
 property float Weight { float get(); void set(float value); };
public float Weight { get; set; }
member this.Weight : single with get, set
Public Property Weight As Single

属性值

调整要拼写此项的可能性的浮点值。

例外

尝试将 Weight 设置为负值。

注解

此属性的默认值为 1.0,这相当于不对项进行加权。 大于 1.0 的权重将正向偏差项目被朗读的可能性,而小于 1.0 的权重则对说话项的可能性产生负偏差。

此属性仅与 SrgsItem 实例中的 SrgsOneOf 对象相关;在所有其他情况下,该属性将被忽略。

适用于

另请参阅