Share via


Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

SrgsItem.SetRepeat Method (Int32, Int32)

Sets the minimum number of times and the maximum number of times that an item can be spoken.

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

Syntax

'Declaration
Public Sub SetRepeat ( _
    minRepeat As Integer, _
    maxRepeat As Integer _
)
'Usage
Dim instance As SrgsItem
Dim minRepeat As Integer
Dim maxRepeat As Integer

instance.SetRepeat(minRepeat, maxRepeat)
public void SetRepeat(
    int minRepeat,
    int maxRepeat
)

Parameters

  • minRepeat
    Type: System.Int32
    The minimum number of times that the item must be spoken.
  • maxRepeat
    Type: System.Int32
    The maximum number of times that the item can be spoken.

Exceptions

Exception Condition
ArgumentOutOfRangeException

minRepeat is less than zero or larger than 255.

maxRepeat is less than zero or larger than 255.

ArgumentException

minRepeat is larger than maxRepeat.

See Also

Reference

SrgsItem Class

SrgsItem Members

SetRepeat Overload

Microsoft.Speech.Recognition.SrgsGrammar Namespace

Other Resources

Create Grammars Using SrgsGrammar (Microsoft.Speech)