You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-11Lines changed: 9 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,25 +86,22 @@ Pipe a `RecognizeStream` to a format stream, and the resulting text and `results
86
86
* Add a period to the end
87
87
* Fix any "cruft" in the transcription
88
88
* A few other tweaks for asian languages and such.
89
-
90
-
#### Methods
91
89
92
-
*`.promise()`: returns a promise that will resolve to the final text, formatted.
93
-
Note that you must either set `continuous: false` or call `.stop()` on the `RecognizeStream` to make the promise resolve in a timely manner.
94
-
95
-
#### Events
96
-
In addition to the standard [Node.js stream events](https://nodejs.org/api/stream.html), the following events are fired:
90
+
Inherits `.promise()` and `.stop()` methods and `result` event from the `RecognizeStream`.
97
91
98
-
*`result`: an individual result object from the results array.
99
-
May include final or interim transcription, alternatives, word timing, confidence scores, etc. depending on passed in options.
100
-
Note: Listening for `result` will automatically put the stream into flowing mode.
92
+
93
+
### Class `TimingStream()`
94
+
95
+
For use with `.recognizeBlob({playFile: true})` - slows the results down to match the audio. Pipe in the `RecognizeStream` (or `FormatStream`) and listen for results as usual.
96
+
97
+
Inherits `.stop()` method and `result` event from the `RecognizeStream`.
101
98
102
99
103
100
## todo
104
101
102
+
* Fix bugs around `.stop()
105
103
* Solidify API
106
104
* (eventually) add text-to-speech support
107
-
* add a WordTimingStream (that slows down output to not go fater than word timings)
108
105
* add an example that includes alternatives and word confidence scores
0 commit comments