Partager via


Note

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

VoiceChangeEventArgs Class

Returns data from the VoiceChange event.

Inheritance Hierarchy

System.Object
  System.EventArgs
    System.ComponentModel.AsyncCompletedEventArgs
      Microsoft.Speech.Synthesis.PromptEventArgs
        Microsoft.Speech.Synthesis.VoiceChangeEventArgs

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

Syntax

'Declaration
Public Class VoiceChangeEventArgs _
    Inherits PromptEventArgs
'Usage
Dim instance As VoiceChangeEventArgs
public class VoiceChangeEventArgs : PromptEventArgs

Remarks

An instance of VoiceChangeEventArgs is created when the SpeechSynthesizer object raises the VoiceChange event. To obtain the identity of the new Voice, access the Voice property in the handler for the event.

You can change the voice in use by the SpeechSynthesizer with any of the PromptBuilder's StartVoice() methods or the SpeechSynthesizer's SelectVoice() or SelectVoiceByHints() methods.

Thread Safety

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

See Also

Reference

VoiceChangeEventArgs Members

Microsoft.Speech.Synthesis Namespace