Skip to content

Commit d2a2183

Browse files
committed
turning on timestamps when realtime is enabled
1 parent ed340f2 commit d2a2183

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

speech-to-text/recognize-blob.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ module.exports = function recognizeBlob(options) {
5353

5454
var realtime = options.realtime || typeof options.realtime === 'undefined' && options.play;
5555

56+
// the timing stream requires timestamps to work, so enable them automatically
57+
if (realtime) {
58+
options.timestamps = true
59+
}
60+
5661
// we don't want the readable stream to have objectMode on the input even if we're setting it for the output
5762
// unless were in realtime mode - in which case the timing stream requires objectMode input.
5863
var rsOpts = assign({}, options);

0 commit comments

Comments
 (0)