File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 55* RecognizeStream no longer sets any default options
66* recognizeMicrophone() and recognizeFile() methods now do set default options that were previously set by RecognizeStream
77* 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)
89
910### v0.24.0
1011* 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
148148 }
149149
150150 // 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 ;
155152
156153 return stream ;
157154} ;
Original file line number Diff line number Diff line change @@ -181,11 +181,11 @@ module.exports = function recognizeMicrophone(options) {
181181 if ( stream !== recognizeStream ) {
182182 // add a stop button to whatever the final stream ends up being
183183 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 ;
187184 }
188185
186+ // expose the original stream to for debugging (and to support the JSON tab on the STT demo)
187+ stream . recognizeStream = recognizeStream ;
188+
189189 return stream ;
190190} ;
191191
You can’t perform that action at this time.
0 commit comments