AppendAudio Method (Uri)
Collapse the table of content
Expand the table of content

PromptBuilder.AppendAudio Method (Uri)


Appends the audio file at the specified URI to the PromptBuilder.

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

public void AppendAudio(
	Uri audioFile


Type: System.Uri

URI for the audio file.

The following example initializes a new instance of the PromptBuilder class and then adds text to it, followed by an audio file.

using System.Speech.PromptBuilder;

public void SimpleConcatenation()
    // Add a prompt fragment from a .wav file.
    PromptBuilder builder = new PromptBuilder ();
    builder.AppendText("How are you today?");
    builder.AppendAudio(new Uri (""));

The following markup shows the equivalent SSML markup.

<speak xmlns=""
       xmlns:ms="" xml:lang="en">

  How are you today?
  <audio src="" />


.NET Framework
Available since 3.0
Return to top
© 2015 Microsoft