Compartir a través de


ISynthesizer.DefaultVoice Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Gets or sets the default voice.

Namespace: Microsoft.SpeechServer.Synthesis
Assembly: Microsoft.SpeechServer (in microsoft.speechserver.dll)

Syntax

'Declaration
Property DefaultVoice As VoiceInfo
VoiceInfo DefaultVoice { get; set; }

Property Value

The voice used as the default voice by this Synthesizer.

Exceptions

Exception type Condition
InvalidOperationException

An attempt is made to set the DefaultVoice property to an unsupported voice.

The synthesizer is active.

Example

        private void statementActivity1_TurnStarting(object sender, TurnStartingEventArgs e)
        {
            Microsoft.SpeechServer.Synthesis.VoiceInfo vi = Workflow.Synthesizer.DefaultVoice;

            statementActivity1.MainPrompt.ClearContent();
            statementActivity1.MainPrompt.AppendText("my Name: " + vi.Name + ", ");
            statementActivity1.MainPrompt.AppendText("my I D: " + vi.Id + ", ");
            statementActivity1.MainPrompt.AppendText("my Gender: " + vi.Gender + ", ");
            statementActivity1.MainPrompt.AppendText("my Culture: " + vi.Culture + ", ");
            statementActivity1.MainPrompt.AppendText("my Age: " + vi.Age + ", ");
            statementActivity1.MainPrompt.AppendText("my Description: " + vi.Description + ", ");
        }

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

Windows Server 2003

See Also

Reference

ISynthesizer Interface
ISynthesizer Members
Microsoft.SpeechServer.Synthesis Namespace