Note

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

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:  Microsoft.Speech.Synthesis
Assembly:  Microsoft.Speech (in Microsoft.Speech.dll)

Syntax

'Declaration
Public Sub StartVoice ( _
    gender As VoiceGender, _
    age As VoiceAge, _
    voiceAlternate As Integer _
)
'Usage
Dim instance As PromptBuilder
Dim gender As VoiceGender
Dim age As VoiceAge
Dim voiceAlternate As Integer

instance.StartVoice(gender, age, voiceAlternate)
public void StartVoice(
    VoiceGender gender,
    VoiceAge age,
    int voiceAlternate
)

Parameters

  • voiceAlternate
    Type: System.Int32
    An integer that specifies a preferred voice when more than one voice matches the gender and age parameters.

Remarks

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(VoiceGender, VoiceAge, Int32) call EndVoice().

See Also

Reference

PromptBuilder Class

PromptBuilder Members

StartVoice Overload

Microsoft.Speech.Synthesis Namespace