Share via


Note

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

PromptBuilder Constructor

Creates a new instance of the PromptBuilder class.

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

Syntax

'Declaration
Public Sub New
'Usage

Dim instance As New PromptBuilder()
public PromptBuilder()

Examples

The following example creates a new PromptBuilder instance and adds a text string to it.

using Microsoft.Speech.Synthesis;

public void MySimpleText ()
{
    PromptBuilder builder = new PromptBuilder ();
    builder.AppendText("Hello world!");
}

The following markup shows the equivalent in Speech Synthesis Markup Language (SSML), (xml:lang is a required attribute of the speak element):

<speak version="1.0"
 xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US">
  Hello world!
</speak>

See Also

Reference

PromptBuilder Class

PromptBuilder Members

PromptBuilder Overload

Microsoft.Speech.Synthesis Namespace