StartVoice Method (VoiceGender, VoiceAge, Int32)

PromptBuilder.StartVoice Method (VoiceGender, VoiceAge, Int32)


Instructs the synthesizer to change the voice in the PromptBuilder object and specifies its gender, age, and a preferred voice that matches the specified gender and age.

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

public void StartVoice(
	VoiceGender gender,
	VoiceAge age,
	int voiceAlternate


Type: System.Speech.Synthesis.VoiceGender

The gender of the voice to use.

Type: System.Speech.Synthesis.VoiceAge

The age of the voice to use.

Type: System.Int32

An integer that specifies a preferred voice when more than one voice matches the gender and age parameters.

A speech synthesis engine counts the matches it finds for the specified parameters, and returns the voice when the count equals the voiceAlternate parameter.

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

To stop using the voice specified by StartVoice call EndVoice.

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