AppendText Method (String, Object[])

Microsoft Speech Platform SDK 11

Collapse imageExpand ImageCopy imageCopyHover image

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

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

Syntax

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

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

Parameters

textToSpeak
Type: System..::..String

A string containing the text to be spoken.

args
Type: array<System..::..Object>[]()[][]

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, array<Object>[]()[][]) method to set the formatting of a string to InvariantCulture.

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

See Also