VoiceInfo Class
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.
Represents a text-to-speech (TTS) voice.
Namespace: Microsoft.SpeechServer.Synthesis
Assembly: Microsoft.SpeechServer (in microsoft.speechserver.dll)
Syntax
'Declaration
<SerializableAttribute> _
<DebuggerDisplayAttribute("{(_name != null ? " & ChrW(34) & "'" & ChrW(34) & " + _name + " & ChrW(34) & "' " & ChrW(34) & " : " & ChrW(34) & "" & ChrW(34) & ") + (_culture != null ? " & ChrW(34) & " '" & ChrW(34) & " + _culture.ToString () + " & ChrW(34) & "' " & ChrW(34) & " : " & ChrW(34) & "" & ChrW(34) & ") + (_gender != VoiceGender.NotSet ? " & ChrW(34) & " '" & ChrW(34) & " + _gender.ToString () + " & ChrW(34) & "' " & ChrW(34) & " : " & ChrW(34) & "" & ChrW(34) & ") + (_age != VoiceAge.NotSet ? " & ChrW(34) & " '" & ChrW(34) & " + _age.ToString () + " & ChrW(34) & "' " & ChrW(34) & " : " & ChrW(34) & "" & ChrW(34) & ") + (_variant > 0 ? " & ChrW(34) & " " & ChrW(34) & " + _variant.ToString () : " & ChrW(34) & "" & ChrW(34) & ")}")> _
Public NotInheritable Class VoiceInfo
[SerializableAttribute]
[DebuggerDisplayAttribute("{(_name != null ? \"\'\" + _name + \"\' \" : \"\") + (_culture != null ? \" \'\" + _culture.ToString () + \"\' \" : \"\") + (_gender != VoiceGender.NotSet ? \" \'\" + _gender.ToString () + \"\' \" : \"\") + (_age != VoiceAge.NotSet ? \" \'\" + _age.ToString () + \"\' \" : \"\") + (_variant > 0 ? \" \" + _variant.ToString () : \"\")}")]
public sealed class VoiceInfo
Inheritance Hierarchy
System.Object
????Microsoft.SpeechServer.Synthesis.VoiceInfo
Example
The following example is the code-beside of a StatementActivity that speaks several VoiceInfo property values.
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
VoiceInfo Members
Microsoft.SpeechServer.Synthesis Namespace