new RecognizeStream(options)
pipe()-able Node.js Readable/Writeable stream - accepts binary audio and emits text in it's data events.
Also emits results events with interim results and other data.
Cannot be instantiated directly, instead reated by calling #createRecognizeStream()
Uses WebSockets under the hood. For audio with no recognizable speech, no data events are emitted.
Parameters:
| Name | Type | Description |
|---|---|---|
options |
Events
close
Parameters:
| Name | Type | Description |
|---|---|---|
reasonCode |
Number | |
description |
String |
data
Finalized text
Parameters:
| Name | Type | Description |
|---|---|---|
transcript |
String |
error
results
Object with interim or final results, including possible alternatives. May have no results at all for empty audio files.
Parameters:
| Name | Type | Description |
|---|---|---|
results |
Object |
speaker_labels
Speaker labels
Parameters:
| Name | Type | Description |
|---|---|---|
speaker_labels |
Object |