/
PhonemeReachedEventArgs.xml
247 lines (232 loc) · 13.4 KB
/
PhonemeReachedEventArgs.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<Type Name="PhonemeReachedEventArgs" FullName="System.Speech.Synthesis.PhonemeReachedEventArgs">
<TypeSignature Language="C#" Value="public class PhonemeReachedEventArgs : System.Speech.Synthesis.PromptEventArgs" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit PhonemeReachedEventArgs extends System.Speech.Synthesis.PromptEventArgs" />
<TypeSignature Language="DocId" Value="T:System.Speech.Synthesis.PhonemeReachedEventArgs" />
<TypeSignature Language="VB.NET" Value="Public Class PhonemeReachedEventArgs
Inherits PromptEventArgs" />
<TypeSignature Language="F#" Value="type PhonemeReachedEventArgs = class
 inherit PromptEventArgs" />
<TypeSignature Language="C++ CLI" Value="public ref class PhonemeReachedEventArgs : System::Speech::Synthesis::PromptEventArgs" />
<AssemblyInfo>
<AssemblyName>System.Speech</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Speech.Synthesis.PromptEventArgs</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Returns data from the <see cref="E:System.Speech.Synthesis.SpeechSynthesizer.PhonemeReached" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A phoneme is a basic component of written language. For more information about phonemes, see <xref:System.Speech.Synthesis.SpeechSynthesizer.PhonemeReached>.
## Examples
The following example is part of a Windows Forms application that writes the information returned by the <xref:System.Speech.Synthesis.SpeechSynthesizer.PhonemeReached> event to a text box. The phonemes are characters from the [International Phonetic Alphabet (IPA)](https://go.microsoft.com/fwlink/?LinkID=207686).
> [!NOTE]
> The first and last characters returned by <xref:System.Speech.Synthesis.PhonemeReachedEventArgs> are opening and closing characters that enclose but do not represent phonemes that constitute a word or phrase. This example returns five characters, but only the middle three characters are phonemes that represent the word "theme": one for the "th" sound, one for the "e" sound, and one for the "m" sound .
```csharp
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Speech.Synthesis;
namespace PhonemeReached
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
textBox1.Text = "";
}
public void button1_Click(object sender, EventArgs e)
{
// Initialize a new instance of the SpeechSynthesizer.
SpeechSynthesizer synth = new SpeechSynthesizer();
// Configure the audio output.
synth.SetOutputToDefaultAudioDevice();
// Register for the PhonemeReached event.
synth.PhonemeReached += new EventHandler<PhonemeReachedEventArgs>(synth_PhonemeReached);
// Speak the contents of a string.
synth.Speak("Theme");
}
// Write information about each phoneme as it is reached.
private void synth_PhonemeReached(object sender, PhonemeReachedEventArgs e)
{textBox1.AppendText(string.Format(
" Phoneme reached summary:" + Environment.NewLine +
" Phoneme: {0}" + Environment.NewLine +
" Audio Position: {1} mSec" + Environment.NewLine +
" Duration: {2} mSec" + Environment.NewLine +
" Emphasis: {3}" + Environment.NewLine +
" Next Phoneme: {4}" + Environment.NewLine + Environment.NewLine,
e.Phoneme,
e.AudioPosition,
e.Duration,
e.Emphasis,
e.NextPhoneme));
}
}
}
```
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName="AudioPosition">
<MemberSignature Language="C#" Value="public TimeSpan AudioPosition { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.TimeSpan AudioPosition" />
<MemberSignature Language="DocId" Value="P:System.Speech.Synthesis.PhonemeReachedEventArgs.AudioPosition" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property AudioPosition As TimeSpan" />
<MemberSignature Language="F#" Value="member this.AudioPosition : TimeSpan" Usage="System.Speech.Synthesis.PhonemeReachedEventArgs.AudioPosition" />
<MemberSignature Language="C++ CLI" Value="public:
 property TimeSpan AudioPosition { TimeSpan get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Speech</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the audio position of the phoneme.</summary>
<value>A <see langword="TimeSpan" /> object indicating the audio position.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Duration">
<MemberSignature Language="C#" Value="public TimeSpan Duration { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.TimeSpan Duration" />
<MemberSignature Language="DocId" Value="P:System.Speech.Synthesis.PhonemeReachedEventArgs.Duration" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Duration As TimeSpan" />
<MemberSignature Language="F#" Value="member this.Duration : TimeSpan" Usage="System.Speech.Synthesis.PhonemeReachedEventArgs.Duration" />
<MemberSignature Language="C++ CLI" Value="public:
 property TimeSpan Duration { TimeSpan get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Speech</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the duration of the phoneme.</summary>
<value>A <see langword="TimeSpan" /> object indicating the duration.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Emphasis">
<MemberSignature Language="C#" Value="public System.Speech.Synthesis.SynthesizerEmphasis Emphasis { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Speech.Synthesis.SynthesizerEmphasis Emphasis" />
<MemberSignature Language="DocId" Value="P:System.Speech.Synthesis.PhonemeReachedEventArgs.Emphasis" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Emphasis As SynthesizerEmphasis" />
<MemberSignature Language="F#" Value="member this.Emphasis : System.Speech.Synthesis.SynthesizerEmphasis" Usage="System.Speech.Synthesis.PhonemeReachedEventArgs.Emphasis" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Speech::Synthesis::SynthesizerEmphasis Emphasis { System::Speech::Synthesis::SynthesizerEmphasis get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Speech</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Speech.Synthesis.SynthesizerEmphasis</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the emphasis of the phoneme.</summary>
<value>A <see langword="SynthesizerEmphasis" /> member indicating the level of emphasis.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="NextPhoneme">
<MemberSignature Language="C#" Value="public string NextPhoneme { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string NextPhoneme" />
<MemberSignature Language="DocId" Value="P:System.Speech.Synthesis.PhonemeReachedEventArgs.NextPhoneme" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property NextPhoneme As String" />
<MemberSignature Language="F#" Value="member this.NextPhoneme : string" Usage="System.Speech.Synthesis.PhonemeReachedEventArgs.NextPhoneme" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ NextPhoneme { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Speech</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the phoneme following the phoneme associated with the <see cref="E:System.Speech.Synthesis.SpeechSynthesizer.PhonemeReached" /> event.</summary>
<value>A string containing the next phoneme.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Phoneme">
<MemberSignature Language="C#" Value="public string Phoneme { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Phoneme" />
<MemberSignature Language="DocId" Value="P:System.Speech.Synthesis.PhonemeReachedEventArgs.Phoneme" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Phoneme As String" />
<MemberSignature Language="F#" Value="member this.Phoneme : string" Usage="System.Speech.Synthesis.PhonemeReachedEventArgs.Phoneme" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ Phoneme { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Speech</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>The phoneme associated with the <see cref="E:System.Speech.Synthesis.SpeechSynthesizer.PhonemeReached" /> event.</summary>
<value>A string containing the phoneme.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>