forked from dotnet/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathns-System.Speech.Synthesis.xml
43 lines (26 loc) · 5.27 KB
/
ns-System.Speech.Synthesis.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<Namespace Name="System.Speech.Synthesis">
<Docs>
<summary>The <c>N:System.Speech.Synthesis</c> namespace contains classes for initializing and configuring a speech synthesis engine, for creating prompts, for generating speech, for responding to events, and for modifying voice characteristics.</summary>
<remarks>
<format type="text/markdown">< in the [System Speech Programming Guide for .NET Framework 4.0](http://msdn.microsoft.com/en-us/610116c7-3817-40ff-857b-5d41e8511043) for more information and examples.
**Generate Speech**
To generate speech from a string or from a <xref:System.Speech.Synthesis.Prompt> or <xref:System.Speech.Synthesis.PromptBuilder> object, use the <xref:System.Speech.Synthesis.SpeechSynthesizer.Speak%2A> or the <xref:System.Speech.Synthesis.SpeechSynthesizer.SpeakAsync%2A> methods. To generate speech from SSML markup, use the <xref:System.Speech.Synthesis.SpeechSynthesizer.SpeakSsml%2A> or the <xref:System.Speech.Synthesis.SpeechSynthesizer.SpeakSsmlAsync%2A> methods. See [Speech Synthesis Markup Language Reference](http://msdn.microsoft.com/en-us/0c51279e-84d2-4f73-a924-8832039abf94) for a guide to SSML markup.
You can guide the pronunciation of words by using the <xref:System.Speech.Synthesis.PromptBuilder.AppendTextWithHint%2A> or <xref:System.Speech.Synthesis.PromptBuilder.AppendTextWithPronunciation%2A> methods, and by adding or removing lexicons for a <xref:System.Speech.Synthesis.SpeechSynthesizer> instance using the <xref:System.Speech.Synthesis.SpeechSynthesizer.AddLexicon%2A> and <xref:System.Speech.Synthesis.SpeechSynthesizer.RemoveLexicon%2A> methods.
**Respond to Events**
The <xref:System.Speech.Synthesis.SpeechSynthesizer> class includes events that inform a speech application that the <xref:System.Speech.Synthesis.SpeechSynthesizer> encountered a specific feature in a prompt, as reported by the <xref:System.Speech.Synthesis.SpeakProgressEventArgs>, <xref:System.Speech.Synthesis.BookmarkReachedEventArgs>, <xref:System.Speech.Synthesis.PhonemeReachedEventArgs>, and <xref:System.Speech.Synthesis.VisemeReachedEventArgs> classes.
To get information about the beginning and end of the speaking of a prompt by the <xref:System.Speech.Synthesis.SpeechSynthesizer>, use the <xref:System.Speech.Synthesis.SpeakStartedEventArgs> and <xref:System.Speech.Synthesis.SpeakCompletedEventArgs> classes.
See [Using Speech Synthesis Events](http://msdn.microsoft.com/en-us/09bf41e6-b88c-4ff2-9287-e42bfd38d836) in the [System Speech Programming Guide for .NET Framework 4.0](http://msdn.microsoft.com/en-us/610116c7-3817-40ff-857b-5d41e8511043) for more information and examples.
**Modify Voice Characteristics**
The <xref:System.Speech.Synthesis.PromptStyle> class and <xref:System.Speech.Synthesis.PromptBuilder.StartStyle%2A> and <xref:System.Speech.Synthesis.PromptBuilder.AppendText%2A> methods let you modify characteristics of a <xref:System.Speech.Synthesis.SpeechSynthesizer> voice using <xref:System.Speech.Synthesis.PromptStyle.Emphasis%2A>, <xref:System.Speech.Synthesis.PromptStyle.Rate%2A>, and <xref:System.Speech.Synthesis.PromptStyle.Volume%2A> parameters. To modify characteristics of a voice such as culture, age, and gender, use one of the <xref:System.Speech.Synthesis.PromptBuilder.StartVoice%2A> methods of the <xref:System.Speech.Synthesis.PromptBuilder> class or the <xref:System.Speech.Synthesis.SpeechSynthesizer.SelectVoiceByHints%2A> methods of the <xref:System.Speech.Synthesis.SpeechSynthesizer> class.
See [Controlling Voice Attributes](http://msdn.microsoft.com/en-us/0fa3f10d-2696-4701-9735-68c59ffe4816) in the [System Speech Programming Guide for .NET Framework 4.0](http://msdn.microsoft.com/en-us/610116c7-3817-40ff-857b-5d41e8511043) for more information.
]]></format>
</remarks>
</Docs>
</Namespace>