Share via


PromptBuilder.AppendAudio Method (Uri)

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

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

Syntax

'Declaration

Parameters

  • audioFile
    URI for the audio file.

Example

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

using Microsoft.Speech.PromptBuilder;

public void SimpleConcatenation()
{

    // Concatenate a prompt fragment from a .wav file
    PromptBuilder builder = new PromptBuilder ();
    builder.AppendText("How are you today?");
    builder.AppendAudio(new Uri ("http://www.speech.microsoft.com/ding.wav"));
}

The following markup shows the equivalent SSML.

<speak xmlns="http://www.w3.org/2001/10/synthesis"
       xmlns:ms="http://www.microsoft.com/speech/synthesis" xml:lang="en">
  How are you today?
  <audio src="http://www.speech.microsoft.com/ding.wav" />
</speak>

Thread Safety

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

See Also

Reference

PromptBuilder Class
PromptBuilder Members
Microsoft.Speech.Synthesis Namespace