File tree 3 files changed +5
-7
lines changed
3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 5
5
* RecognizeStream no longer sets any default options
6
6
* recognizeMicrophone() and recognizeFile() methods now do set default options that were previously set by RecognizeStream
7
7
* added new 'message' event to RecognizeStream that emits any message received over the WebSocket (mainly for debugging and demo usage)
8
+ * exposed recognizeStream property on any stream returned from recognizeMicrophone() or recognizeFile() (for debugging)
8
9
9
10
### v0.24.0
10
11
* Renamed ` ResultExtractor ` to ` ResultStream ` , exposed it in speech-to-text/index.js
Original file line number Diff line number Diff line change @@ -148,10 +148,7 @@ module.exports = function recognizeFile(options) { // eslint-disable-line comple
148
148
}
149
149
150
150
// expose the original stream to for debugging (and to support the JSON tab on the STT demo)
151
- if ( stream !== recognizeStream ) {
152
- stream . recognizeStream = recognizeStream ;
153
- }
154
-
151
+ stream . recognizeStream = recognizeStream ;
155
152
156
153
return stream ;
157
154
} ;
Original file line number Diff line number Diff line change @@ -181,11 +181,11 @@ module.exports = function recognizeMicrophone(options) {
181
181
if ( stream !== recognizeStream ) {
182
182
// add a stop button to whatever the final stream ends up being
183
183
stream . stop = recognizeStream . stop . bind ( recognizeStream ) ;
184
-
185
- // expose the original stream to for debugging (and to support the JSON tab on the STT demo)
186
- stream . recognizeStream = recognizeStream ;
187
184
}
188
185
186
+ // expose the original stream to for debugging (and to support the JSON tab on the STT demo)
187
+ stream . recognizeStream = recognizeStream ;
188
+
189
189
return stream ;
190
190
} ;
191
191
You can’t perform that action at this time.
0 commit comments