/
TranslationRecognizer.yml
467 lines (461 loc) · 17.3 KB
/
TranslationRecognizer.yml
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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
### YamlMime:TSType
name: TranslationRecognizer
uid: microsoft-cognitiveservices-speech-sdk.TranslationRecognizer
package: microsoft-cognitiveservices-speech-sdk
summary: Translation recognizer
fullName: TranslationRecognizer
remarks: ''
isDeprecated: false
type: class
constructors:
- name: >-
TranslationRecognizer(SpeechTranslationConfig, AudioConfig,
IConnectionFactory)
uid: microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.constructor
package: microsoft-cognitiveservices-speech-sdk
summary: Initializes an instance of the TranslationRecognizer.
remarks: ''
isDeprecated: false
syntax:
content: >-
new TranslationRecognizer(speechConfig: SpeechTranslationConfig,
audioConfig?: AudioConfig, connectionFactory?: IConnectionFactory)
parameters:
- id: speechConfig
type: >-
<xref
uid="microsoft-cognitiveservices-speech-sdk.SpeechTranslationConfig"
/>
description: Set of properties to configure this recognizer.
- id: audioConfig
type: <xref uid="microsoft-cognitiveservices-speech-sdk.AudioConfig" />
description: An optional audio config associated with the recognizer
- id: connectionFactory
type: IConnectionFactory
description: >-
An optional connection factory to use to generate the endpoint URIs,
headers to set, etc...
properties:
- name: authorizationToken
uid: >-
microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.authorizationToken
package: microsoft-cognitiveservices-speech-sdk
summary: Gets the authorization token used to communicate with the service.
fullName: authorizationToken
remarks: ''
isDeprecated: false
syntax:
content: string authorizationToken
return:
description: Authorization token.
type: string
- name: canceled
uid: microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.canceled
package: microsoft-cognitiveservices-speech-sdk
summary: The event canceled signals that an error occurred during recognition.
fullName: canceled
remarks: ''
isDeprecated: false
syntax:
content: >-
public canceled: (sender: TranslationRecognizer, event:
TranslationRecognitionCanceledEventArgs) => void
return:
description: ''
type: >-
(sender: TranslationRecognizer, event:
TranslationRecognitionCanceledEventArgs) => void
- name: internalData
uid: microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.internalData
package: microsoft-cognitiveservices-speech-sdk
summary: ''
fullName: internalData
remarks: ''
isDeprecated: false
syntax:
content: object internalData
return:
description: ''
type: object
- name: properties
uid: microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.properties
package: microsoft-cognitiveservices-speech-sdk
summary: >-
The collection of properties and their values defined for this
TranslationRecognizer.
fullName: properties
remarks: ''
isDeprecated: false
syntax:
content: PropertyCollection properties
return:
description: >-
The collection of properties and their values defined for this
TranslationRecognizer.
type: >-
<xref uid="microsoft-cognitiveservices-speech-sdk.PropertyCollection"
/>
- name: recognized
uid: microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.recognized
package: microsoft-cognitiveservices-speech-sdk
summary: The event recognized signals that a final recognition result is received.
fullName: recognized
remarks: ''
isDeprecated: false
syntax:
content: >-
public recognized: (sender: TranslationRecognizer, event:
TranslationRecognitionEventArgs) => void
return:
description: ''
type: >-
(sender: TranslationRecognizer, event:
TranslationRecognitionEventArgs) => void
- name: recognizing
uid: microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.recognizing
package: microsoft-cognitiveservices-speech-sdk
summary: >-
The event recognizing signals that an intermediate recognition result is
received.
fullName: recognizing
remarks: ''
isDeprecated: false
syntax:
content: >-
public recognizing: (sender: TranslationRecognizer, event:
TranslationRecognitionEventArgs) => void
return:
description: ''
type: >-
(sender: TranslationRecognizer, event:
TranslationRecognitionEventArgs) => void
- name: speechRecognitionLanguage
uid: >-
microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.speechRecognitionLanguage
package: microsoft-cognitiveservices-speech-sdk
summary: Gets the language name that was set when the recognizer was created.
fullName: speechRecognitionLanguage
remarks: ''
isDeprecated: false
syntax:
content: string speechRecognitionLanguage
return:
description: Gets the language name that was set when the recognizer was created.
type: string
- name: synthesizing
uid: microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.synthesizing
package: microsoft-cognitiveservices-speech-sdk
summary: >-
The event synthesizing signals that a translation synthesis result is
received.
fullName: synthesizing
remarks: ''
isDeprecated: false
syntax:
content: >-
public synthesizing: (sender: TranslationRecognizer, event:
TranslationSynthesisEventArgs) => void
return:
description: ''
type: >-
(sender: TranslationRecognizer, event: TranslationSynthesisEventArgs)
=> void
- name: targetLanguages
uid: >-
microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.targetLanguages
package: microsoft-cognitiveservices-speech-sdk
summary: >-
Gets target languages for translation that were set when the recognizer
was created.
The language is specified in BCP-47 format. The translation will provide
translated text for each of language.
fullName: targetLanguages
remarks: ''
isDeprecated: false
syntax:
content: string[] targetLanguages
return:
description: >-
Gets target languages for translation that were set when the
recognizer was created.
type: string[]
- name: telemetryEnabled
uid: >-
microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.telemetryEnabled
package: microsoft-cognitiveservices-speech-sdk
summary: This method returns the current state of the telemetry setting.
fullName: telemetryEnabled
remarks: ''
isDeprecated: false
syntax:
content: static boolean telemetryEnabled
return:
description: true if the telemetry is enabled, false otherwise.
type: boolean
- name: voiceName
uid: microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.voiceName
package: microsoft-cognitiveservices-speech-sdk
summary: Gets the name of output voice.
fullName: voiceName
remarks: ''
isDeprecated: false
syntax:
content: string voiceName
return:
description: the name of output voice.
type: string
inheritedProperties:
- name: sessionStarted
uid: >-
microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.sessionStarted
package: microsoft-cognitiveservices-speech-sdk
summary: Defines event handler for session started events.
fullName: sessionStarted
remarks: ''
isDeprecated: false
syntax:
content: >-
public sessionStarted: (sender: Recognizer, event: SessionEventArgs) =>
void
return:
description: ''
type: '(sender: Recognizer, event: SessionEventArgs) => void'
inheritanceDescription: >-
<b>Inherited From</b>
[Recognizer.sessionStarted](xref:microsoft-cognitiveservices-speech-sdk.Recognizer.sessionStarted)
- name: sessionStopped
uid: >-
microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.sessionStopped
package: microsoft-cognitiveservices-speech-sdk
summary: Defines event handler for session stopped events.
fullName: sessionStopped
remarks: ''
isDeprecated: false
syntax:
content: >-
public sessionStopped: (sender: Recognizer, event: SessionEventArgs) =>
void
return:
description: ''
type: '(sender: Recognizer, event: SessionEventArgs) => void'
inheritanceDescription: >-
<b>Inherited From</b>
[Recognizer.sessionStopped](xref:microsoft-cognitiveservices-speech-sdk.Recognizer.sessionStopped)
- name: speechEndDetected
uid: >-
microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.speechEndDetected
package: microsoft-cognitiveservices-speech-sdk
summary: Defines event handler for speech stopped events.
fullName: speechEndDetected
remarks: ''
isDeprecated: false
syntax:
content: >-
public speechEndDetected: (sender: Recognizer, event:
RecognitionEventArgs) => void
return:
description: ''
type: '(sender: Recognizer, event: RecognitionEventArgs) => void'
inheritanceDescription: >-
<b>Inherited From</b>
[Recognizer.speechEndDetected](xref:microsoft-cognitiveservices-speech-sdk.Recognizer.speechEndDetected)
- name: speechStartDetected
uid: >-
microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.speechStartDetected
package: microsoft-cognitiveservices-speech-sdk
summary: Defines event handler for speech started events.
fullName: speechStartDetected
remarks: ''
isDeprecated: false
syntax:
content: >-
public speechStartDetected: (sender: Recognizer, event:
RecognitionEventArgs) => void
return:
description: ''
type: '(sender: Recognizer, event: RecognitionEventArgs) => void'
inheritanceDescription: >-
<b>Inherited From</b>
[Recognizer.speechStartDetected](xref:microsoft-cognitiveservices-speech-sdk.Recognizer.speechStartDetected)
inheritedMethods:
- name: enableTelemetry(boolean)
uid: >-
microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.enableTelemetry
package: microsoft-cognitiveservices-speech-sdk
summary: This method globally enables or disables telemetry.
remarks: ''
isDeprecated: false
syntax:
content: 'static function enableTelemetry(enabled: boolean)'
parameters:
- id: enabled
type: boolean
description: |-
Global setting for telemetry collection.
If set to true, telemetry information like microphone errors,
recognition errors are collected and sent to Microsoft.
If set to false, no telemetry is sent to Microsoft.
inheritanceDescription: >-
<b>Inherited From</b>
[Recognizer.enableTelemetry](xref:microsoft-cognitiveservices-speech-sdk.Recognizer.enableTelemetry)
methods:
- name: addTargetLanguage(string)
uid: >-
microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.addTargetLanguage
package: microsoft-cognitiveservices-speech-sdk
summary: |-
dynamically add a language to list of target language
(can be used while recognition is ongoing)
remarks: ''
isDeprecated: false
syntax:
content: 'function addTargetLanguage(lang: string)'
parameters:
- id: lang
type: string
description: language to be added
- name: 'close(() => void, (error: string) => void)'
uid: microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.close
package: microsoft-cognitiveservices-speech-sdk
summary: closes all external resources held by an instance of this class.
remarks: ''
isDeprecated: false
syntax:
content: 'function close(cb?: () => void, errorCb?: (error: string) => void)'
parameters:
- id: cb
type: () => void
description: ''
- id: errorCb
type: '(error: string) => void'
description: ''
- name: >-
FromConfig(SpeechTranslationConfig, AutoDetectSourceLanguageConfig,
AudioConfig)
uid: microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.FromConfig
package: microsoft-cognitiveservices-speech-sdk
summary: TranslationRecognizer constructor.
remarks: ''
isDeprecated: false
syntax:
content: >-
static function FromConfig(speechTranslationConfig:
SpeechTranslationConfig, autoDetectSourceLanguageConfig:
AutoDetectSourceLanguageConfig, audioConfig?: AudioConfig):
TranslationRecognizer
parameters:
- id: speechTranslationConfig
type: >-
<xref
uid="microsoft-cognitiveservices-speech-sdk.SpeechTranslationConfig"
/>
description: an set of initial properties for this recognizer
- id: autoDetectSourceLanguageConfig
type: >-
<xref
uid="microsoft-cognitiveservices-speech-sdk.AutoDetectSourceLanguageConfig"
/>
description: >-
An source language detection configuration associated with the
recognizer
- id: audioConfig
type: <xref uid="microsoft-cognitiveservices-speech-sdk.AudioConfig" />
description: An optional audio configuration associated with the recognizer
return:
description: ''
type: >-
<xref
uid="microsoft-cognitiveservices-speech-sdk.TranslationRecognizer" />
- name: onConnection()
uid: microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.onConnection
package: microsoft-cognitiveservices-speech-sdk
summary: handles ConnectionEstablishedEvent for conversation translation scenarios.
remarks: ''
isDeprecated: false
syntax:
content: function onConnection()
- name: >-
recognizeOnceAsync((e: TranslationRecognitionResult) => void, (e: string)
=> void)
uid: >-
microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.recognizeOnceAsync
package: microsoft-cognitiveservices-speech-sdk
summary: >-
Starts recognition and translation, and stops after the first utterance is
recognized.
The task returns the translation text as result.
Note: recognizeOnceAsync returns when the first utterance has been
recognized, so it is suitable only
for single shot recognition like command or query. For long-running
recognition,
use startContinuousRecognitionAsync() instead.
remarks: ''
isDeprecated: false
syntax:
content: >-
function recognizeOnceAsync(cb?: (e: TranslationRecognitionResult) =>
void, err?: (e: string) => void)
parameters:
- id: cb
type: '(e: TranslationRecognitionResult) => void'
description: >-
Callback that received the result when the translation has
completed.
- id: err
type: '(e: string) => void'
description: Callback invoked in case of an error.
- name: removeTargetLanguage(string)
uid: >-
microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.removeTargetLanguage
package: microsoft-cognitiveservices-speech-sdk
summary: |-
dynamically remove a language from list of target language
(can be used while recognition is ongoing)
remarks: ''
isDeprecated: false
syntax:
content: 'function removeTargetLanguage(lang: string)'
parameters:
- id: lang
type: string
description: language to be removed
- name: 'startContinuousRecognitionAsync(() => void, (e: string) => void)'
uid: >-
microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.startContinuousRecognitionAsync
package: microsoft-cognitiveservices-speech-sdk
summary: >-
Starts recognition and translation, until stopContinuousRecognitionAsync()
is called.
User must subscribe to events to receive translation results.
remarks: ''
isDeprecated: false
syntax:
content: >-
function startContinuousRecognitionAsync(cb?: () => void, err?: (e:
string) => void)
parameters:
- id: cb
type: () => void
description: Callback that received the translation has started.
- id: err
type: '(e: string) => void'
description: Callback invoked in case of an error.
- name: 'stopContinuousRecognitionAsync(() => void, (e: string) => void)'
uid: >-
microsoft-cognitiveservices-speech-sdk.TranslationRecognizer.stopContinuousRecognitionAsync
package: microsoft-cognitiveservices-speech-sdk
summary: Stops continuous recognition and translation.
remarks: ''
isDeprecated: false
syntax:
content: >-
function stopContinuousRecognitionAsync(cb?: () => void, err?: (e:
string) => void)
parameters:
- id: cb
type: () => void
description: Callback that received the translation has stopped.
- id: err
type: '(e: string) => void'
description: Callback invoked in case of an error.
extends: <xref uid="microsoft-cognitiveservices-speech-sdk.Recognizer" />