StartVoice Method (String)

Microsoft Speech Platform SDK 11

Collapse imageExpand ImageCopy imageCopyHover image

Instructs the synthesizer to change the voice in the PromptBuilder object and specifies the name of the voice to use.

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

Syntax

Visual Basic (Declaration)
Public Sub StartVoice ( _
	name As String _
)
Visual Basic (Usage)
Dim instance As PromptBuilder
Dim name As String

instance.StartVoice(name)
C#
public void StartVoice(
	string name
)

Parameters

name
Type: System..::..String

The name of the voice to use.

Remarks

Use the GetInstalledVoices()()()() methods and VoiceInfo class to obtain the names and attributes of installed text-to-speech (TTS) voices that you can select.

Examples

To specify a voice, the name parameter must contain the exact and entire contents of the Name property. The following code fragment initializes a PromptBuilder in English and changes the voice to French.

 Copy imageCopy Code
// Change the voice to French in a PromptBuilder.
PromptBuilder builder = new PromptBuilder(
  new System.Globalization.CultureInfo("en-US"));
builder.StartVoice(
  "Microsoft Server Speech Text to Speech Voice (fr-FR, Hortense)");
builder.AppendText("Nous sommes arrivé");
builder.EndVoice();

See Also