Compartir a través de


Note

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

PromptBuilder.AppendText Method (String, Object[])

Appends text to the PromptBuilder object and specifies formatting for the text.

Namespace:  Microsoft.Speech.Synthesis
Assembly:  Microsoft.Speech (in Microsoft.Speech.dll)

Syntax

'Declaration
Public Sub AppendText ( _
    textToSpeak As String, _
    ParamArray args As Object() _
)
'Usage
Dim instance As PromptBuilder
Dim textToSpeak As String
Dim args As Object()

instance.AppendText(textToSpeak, args)
public void AppendText(
    string textToSpeak,
    params Object[] args
)

Parameters

  • textToSpeak
    Type: System.String
    A string containing the text to be spoken.
  • args
    Type: []
    Objects that determine the formatting of the string specified by textToSpeak.

Remarks

This method uses the object array specified by args as parameters to Format().

Examples

The following example uses the AppendText(String, []) method to set the formatting of a string to InvariantCulture.

public void AppendText(string textToSpeak, params object[] args)
{
  AppendText(String.Format(CultureInfo.InvariantCulture, textToSpeak, args));
}

See Also

Reference

PromptBuilder Class

PromptBuilder Members

AppendText Overload

Microsoft.Speech.Synthesis Namespace