Class: TimingStream

TimingStream

new TimingStream(optsopt)

Slows results down to no faster than real time.

Useful when running recognizeFile because the text can otherwise appear before the words are spoken

Parameters:
Name Type Attributes Description
opts Object <optional>
Properties
Name Type Attributes Default Description
emitAt * <optional>
TimingStream.END

set to TimingStream.START for a more subtitles-like output where results are returned as soon as the utterance begins

delay Number <optional>
0

Additional delay (in seconds) to apply before emitting words, useful for precise syncing to audio tracks. May be negative

Source:

Methods

setStartTime(timeopt)

Overrides the start time, adjusting the delay applied to all pending results.

Stream may emit up to 1 more result based on the older time after this is called.

Parameters:
Name Type Attributes Default Description
time Number <optional>
Date.now()

Start time in Miliseconds since epoch

Source: