/
Prompt.xml
254 lines (227 loc) · 13 KB
/
Prompt.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
248
249
250
251
252
253
254
<Type Name="Prompt" FullName="System.Speech.Synthesis.Prompt">
<TypeSignature Language="C#" Value="public class Prompt" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit Prompt extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Speech.Synthesis.Prompt" />
<TypeSignature Language="VB.NET" Value="Public Class Prompt" />
<TypeSignature Language="F#" Value="type Prompt = class" />
<TypeSignature Language="C++ CLI" Value="public ref class Prompt" />
<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.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="net-6.0;net-7.0;net-8.0;net-9.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Diagnostics.DebuggerDisplay("{_text}")]</AttributeName>
<AttributeName Language="F#">[<System.Diagnostics.DebuggerDisplay("{_text}")>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents information about what can be rendered, either text or an audio file, by the <see cref="T:System.Speech.Synthesis.SpeechSynthesizer" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A <xref:System.Speech.Synthesis.Prompt> object can contain plain text, text formatted with markup language, or audio files.
An empty <xref:System.Speech.Synthesis.Prompt> object is created with each new instance of <xref:System.Speech.Synthesis.PromptBuilder>. The <xref:System.Speech.Synthesis.PromptBuilder> class provides methods for adding content, including text, SSML markup, bookmarks, and prerecorded audio files (such as .wav files), to the empty <xref:System.Speech.Synthesis.Prompt> object that it contains. Typically, applications will use <xref:System.Speech.Synthesis.PromptBuilder>, rather than a <xref:System.Speech.Synthesis.Prompt> object, to create prompts and populate them with content.
To generate speech from the contents of a <xref:System.Speech.Synthesis.Prompt> object, use the <xref:System.Speech.Synthesis.SpeechSynthesizer.Speak%2A> method.
]]></format>
</remarks>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Speech</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Creates a new instance of the <see cref="T:System.Speech.Synthesis.Prompt" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Prompt (System.Speech.Synthesis.PromptBuilder promptBuilder);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Speech.Synthesis.PromptBuilder promptBuilder) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Speech.Synthesis.Prompt.#ctor(System.Speech.Synthesis.PromptBuilder)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (promptBuilder As PromptBuilder)" />
<MemberSignature Language="F#" Value="new System.Speech.Synthesis.Prompt : System.Speech.Synthesis.PromptBuilder -> System.Speech.Synthesis.Prompt" Usage="new System.Speech.Synthesis.Prompt promptBuilder" />
<MemberSignature Language="C++ CLI" Value="public:
 Prompt(System::Speech::Synthesis::PromptBuilder ^ promptBuilder);" />
<MemberType>Constructor</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>
<Parameters>
<Parameter Name="promptBuilder" Type="System.Speech.Synthesis.PromptBuilder" />
</Parameters>
<Docs>
<param name="promptBuilder">The content to be spoken.</param>
<summary>Creates a new instance of the <see cref="T:System.Speech.Synthesis.Prompt" /> class from a <see cref="T:System.Speech.Synthesis.PromptBuilder" /> object.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Prompt (string textToSpeak);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string textToSpeak) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Speech.Synthesis.Prompt.#ctor(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (textToSpeak As String)" />
<MemberSignature Language="F#" Value="new System.Speech.Synthesis.Prompt : string -> System.Speech.Synthesis.Prompt" Usage="new System.Speech.Synthesis.Prompt textToSpeak" />
<MemberSignature Language="C++ CLI" Value="public:
 Prompt(System::String ^ textToSpeak);" />
<MemberType>Constructor</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#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="textToSpeak" Type="System.String" />
</Parameters>
<Docs>
<param name="textToSpeak">The text to be spoken.</param>
<summary>Creates a new instance of the <see cref="T:System.Speech.Synthesis.Prompt" /> class and specifies the text to be spoken.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example creates a <xref:System.Speech.Synthesis.Prompt> object from a string and passes the object as an argument to the <xref:System.Speech.Synthesis.SpeechSynthesizer.Speak%2A> method.
```csharp
using System;
using System.Speech.Synthesis;
namespace SampleSynthesis
{
class Program
{
static void Main(string[] args)
{
// Initialize a new instance of the SpeechSynthesizer.
using (SpeechSynthesizer synth = new SpeechSynthesizer())
{
// Configure the audio output.
synth.SetOutputToDefaultAudioDevice();
// Create a prompt from a string.
Prompt color = new Prompt("What is your favorite color?");
// Speak the contents of the prompt synchronously.
synth.Speak(color);
}
Console.WriteLine();
Console.WriteLine("Press any key to exit...");
Console.ReadKey();
}
}
}
```
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Prompt (string textToSpeak, System.Speech.Synthesis.SynthesisTextFormat media);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string textToSpeak, valuetype System.Speech.Synthesis.SynthesisTextFormat media) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Speech.Synthesis.Prompt.#ctor(System.String,System.Speech.Synthesis.SynthesisTextFormat)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (textToSpeak As String, media As SynthesisTextFormat)" />
<MemberSignature Language="F#" Value="new System.Speech.Synthesis.Prompt : string * System.Speech.Synthesis.SynthesisTextFormat -> System.Speech.Synthesis.Prompt" Usage="new System.Speech.Synthesis.Prompt (textToSpeak, media)" />
<MemberSignature Language="C++ CLI" Value="public:
 Prompt(System::String ^ textToSpeak, System::Speech::Synthesis::SynthesisTextFormat media);" />
<MemberType>Constructor</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>
<Parameters>
<Parameter Name="textToSpeak" Type="System.String" />
<Parameter Name="media" Type="System.Speech.Synthesis.SynthesisTextFormat" />
</Parameters>
<Docs>
<param name="textToSpeak">The text to be spoken.</param>
<param name="media">A value that specifies the format of the text.</param>
<summary>Creates a new instance of the <see cref="T:System.Speech.Synthesis.Prompt" /> class and specifies the text to be spoken and whether its format is plain text or markup language.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The contents of the `textToSpeak` parameter must include a `speak` element and must conform to the [Speech Synthesis Markup Language (SSML) Version 1.0](https://go.microsoft.com/fwlink/?LinkId=201763). For more information, see [Speech Synthesis Markup Language Reference](https://msdn.microsoft.com/library/0c51279e-84d2-4f73-a924-8832039abf94).
## Examples
The following example builds a string that contains SSML markup, creates a <xref:System.Speech.Synthesis.Prompt> object from the string, and speaks the prompt.
```csharp
using System;
using System.Speech.Synthesis;
namespace SampleSynthesis
{
class Program
{
static void Main(string[] args)
{
// Initialize a new instance of the SpeechSynthesizer.
using (SpeechSynthesizer synth = new SpeechSynthesizer())
{
// Configure the audio output.
synth.SetOutputToDefaultAudioDevice();
// Build an SSML prompt in a string.
string fileName = "<speak version=\"1.0\" ";
fileName += "xmlns=\"http://www.w3.org/2001/10/synthesis\" ";
fileName += "xml:lang=\"en-US\">";
fileName += "Say a name for the new file <mark name=\"fileName\" />.";
fileName += "</speak>";
// Create a Prompt object from the string.
Prompt ssmlFile = new Prompt(fileName, SynthesisTextFormat.Ssml);
// Speak the contents of the SSML prompt.
synth.Speak(ssmlFile);
}
Console.WriteLine();
Console.WriteLine("Press any key to exit...");
Console.ReadKey();
}
}
}
```
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IsCompleted">
<MemberSignature Language="C#" Value="public bool IsCompleted { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsCompleted" />
<MemberSignature Language="DocId" Value="P:System.Speech.Synthesis.Prompt.IsCompleted" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IsCompleted As Boolean" />
<MemberSignature Language="F#" Value="member this.IsCompleted : bool" Usage="System.Speech.Synthesis.Prompt.IsCompleted" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool IsCompleted { bool 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.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets whether the <see cref="T:System.Speech.Synthesis.Prompt" /> has finished playing.</summary>
<value>Returns <see langword="true" /> if the prompt has completed; otherwise <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>