Bagikan melalui


Note

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

SrgsToken.Text Property

Gets or sets the text contained within the SrgsToken class instance.

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

Syntax

'Declaration
Public Property Text As String
    Get
    Set
'Usage
Dim instance As SrgsToken
Dim value As String

value = instance.Text

instance.Text = value
public string Text { get; set; }

Property Value

Type: System.String
The text contained within the SrgsToken class instance.

Exceptions

Exception Condition
ArgumentNullException

An attempt is made to set Text to a null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

An attempt is made to assign an empty string to Text.

ArgumentException

An attempt is made to assign a string that contains a quotation mark (") to Text.

Remarks

Although they typically represent the same value, the Text form may be different than the Display form for a word or phrase in a SrgsToken. For example, the Display form may be an acronym, such as “USA”, while the text that will be spoken, and to which the Pronunciation applies, is “United States of America”.

The default value for the Text property is an empty string—"".

See Also

Reference

SrgsToken Class

SrgsToken Members

Microsoft.Speech.Recognition.SrgsGrammar Namespace