-
Notifications
You must be signed in to change notification settings - Fork 10
/
AzureSpeechToCaptionsSettings.ts
90 lines (78 loc) · 3.05 KB
/
AzureSpeechToCaptionsSettings.ts
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
import {map, mapArray} from '../common/Mapper';
import AzureSpeechServicesCredentials from './AzureSpeechServicesCredentials';
import AzureSpeechToCaptionsProfanity from './AzureSpeechToCaptionsProfanity';
/**
* @export
* @class AzureSpeechToCaptionsSettings
*/
export class AzureSpeechToCaptionsSettings {
/**
* Credential settings to access Azure Speech Services
* @type {AzureSpeechServicesCredentials}
* @memberof AzureSpeechToCaptionsSettings
*/
public azureSpeechServicesCredentials?: AzureSpeechServicesCredentials;
/**
* Azure Speech Services Region Identifier. The list of speech service supported regions can be found at Azure's official documentation.
* @type {string}
* @memberof AzureSpeechToCaptionsSettings
*/
public region?: string;
/**
* Azure Speech Services API endpoint. This information can be found in Azure's Speech resource data.
* @type {string}
* @memberof AzureSpeechToCaptionsSettings
*/
public apiEndpoint?: string;
/**
* Azure Speech to captions supported language (IETF BCP 47 language tag). The list of supported languages can be found at Azure's official documentation.
* @type {string}
* @memberof AzureSpeechToCaptionsSettings
*/
public language?: string;
/**
* How many MILLISECONDS to delay the display of each caption, to mimic a real-time experience. The minimum value is 0.
* @type {number}
* @memberof AzureSpeechToCaptionsSettings
*/
public captionDelay?: number;
/**
* How many MILLISECONDS a caption should remain on screen if it is not replaced by another. The minimum value is 0.
* @type {number}
* @memberof AzureSpeechToCaptionsSettings
*/
public captionRemainTime?: number;
/**
* The maximum number of characters per line for a caption. The minimum value is 20.
* @type {number}
* @memberof AzureSpeechToCaptionsSettings
*/
public captionMaxLineLength?: number;
/**
* The number of lines for a caption. The minimum value is 1.
* @type {number}
* @memberof AzureSpeechToCaptionsSettings
*/
public captionLines?: number;
/**
* The profanity filter options are: - Masked: Replaces letters in profane words with asterisk (*) characters. - Raw: Include the profane words verbatim. - Removed: Removes profane words.
* @type {AzureSpeechToCaptionsProfanity}
* @memberof AzureSpeechToCaptionsSettings
*/
public profanityOption?: AzureSpeechToCaptionsProfanity;
constructor(obj?: Partial<AzureSpeechToCaptionsSettings>) {
if(!obj) {
return;
}
this.azureSpeechServicesCredentials = map(obj.azureSpeechServicesCredentials, AzureSpeechServicesCredentials);
this.region = map(obj.region);
this.apiEndpoint = map(obj.apiEndpoint);
this.language = map(obj.language);
this.captionDelay = map(obj.captionDelay);
this.captionRemainTime = map(obj.captionRemainTime);
this.captionMaxLineLength = map(obj.captionMaxLineLength);
this.captionLines = map(obj.captionLines);
this.profanityOption = map(obj.profanityOption);
}
}
export default AzureSpeechToCaptionsSettings;