Skip to content

Commit cd9432b

Browse files
committed
put recognizeStream into flowing mode without creating an empty function for result/results events
1 parent 197ac58 commit cd9432b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

speech-to-text/recognize-stream.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,7 @@ function RecognizeStream(options) {
146146
if (event === 'results' || event === 'result') {
147147
self.removeListener('newListener', flowForResults);
148148
process.nextTick(function() {
149-
self.on('data', function() {
150-
}); // todo: is there a better way to put a stream in flowing mode?
149+
self.resume(); // put this stream in flowing mode
151150
});
152151
if (!options.silent) {
153152
// todo: move this to the node.js wrapper

0 commit comments

Comments
 (0)