You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// these options represent the superset of the base params,
26
-
// query params, and opening message params, with the keys
27
-
// in lowerCamelCase format so we can expose a consistent style
28
-
// to the user. this object should be updated any time either
29
-
// openingMessageParamsAllowed or queryParamsAllowed is changed
30
-
interfaceOptionsextendsDuplexOptions{
31
-
/* Base Properties */
32
-
authenticator: Authenticator;
33
-
url?: string;
34
-
headers?: OutgoingHttpHeaders;
35
-
readableObjectMode?: boolean;
36
-
objectMode?: boolean;
37
-
disableSslVerification?: boolean;
38
-
39
-
/* Query Params*/
40
-
accessToken: string;
41
-
watsonToken: string;
42
-
model: string;
43
-
languageCustomizationId: string;
44
-
acousticCustomizationId: string;
45
-
baseModelVersion: string;
46
-
xWatsonLearningOptOut: boolean;
47
-
xWatsonMetadata: string;
48
-
49
-
/* Opening Message Params */
50
-
contentType: string;
51
-
customizationWeight: number;
52
-
inactivityTimeout: number;
53
-
interimResults: boolean;
54
-
keywords: string[];
55
-
keywordsThreshold: number;
56
-
maxAlternatives: number;
57
-
wordAlternativesThreshold: number;
58
-
wordConfidence: boolean;
59
-
timestamps: boolean;
60
-
profanityFilter: boolean;
61
-
smartFormatting: boolean;
62
-
speakerLabels: boolean;
63
-
grammarName: string;
64
-
redaction: boolean;
65
-
processingMetrics: boolean;
66
-
processingMetricsInterval: number;
67
-
audioMetrics: boolean;
25
+
interfaceWritableState{
26
+
highWaterMark: number;
68
27
}
69
28
70
29
interfaceRecognizeStreamextendsDuplex{
71
-
_writableState;
72
-
readableObjectMode;
30
+
_writableState: WritableState;
31
+
readableObjectMode: boolean;
73
32
}
74
33
75
34
/**
@@ -92,12 +51,12 @@ class RecognizeStream extends Duplex {
92
51
returncontentType.fromHeader(buffer);
93
52
}
94
53
95
-
privateoptions: Options;
54
+
privateoptions: RecognizeStream.Options;
96
55
privateauthenticator: Authenticator;
97
56
privatelistening: boolean;
98
57
privateinitialized: boolean;
99
58
privatefinished: boolean;
100
-
privatesocket;
59
+
privatesocket: w3cWebSocket;
101
60
102
61
/**
103
62
* pipe()-able Node.js Duplex stream - accepts binary audio and emits text/objects in it's `data` events.
@@ -144,7 +103,7 @@ class RecognizeStream extends Duplex {
144
103
* @param {boolean} [options.audioMetrics] - If true, requests detailed information about the signal characteristics of the input audio (detailed=false)
145
104
* @constructor
146
105
*/
147
-
constructor(options: Options){
106
+
constructor(options: RecognizeStream.Options){
148
107
// this stream only supports objectMode on the output side.
149
108
// It must receive binary data input.
150
109
if(options.objectMode){
@@ -511,4 +470,16 @@ class RecognizeStream extends Duplex {
0 commit comments