Skip to content

Commit 197ac58

Browse files
committed
filtering out timestamps for filtered words
1 parent fde731f commit 197ac58

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

speech-to-text/format-stream.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,10 @@ FormatStream.prototype.formatResult = function formatResult(result, encoding, ne
112112
ts[0] = this.period(ts[0]);
113113
}
114114
return ts;
115-
}, this);
116-
// todo: remove any timestamps without a word (due to cleaning out junk words)
115+
}, this).filter(function(ts) {
116+
return ts[0]; // remove any timestamps without a word (due to cleaning out junk words)
117+
118+
});
117119
}
118120
return alt;
119121
}, this);

0 commit comments

Comments
 (0)