An instance of a speech-to-text stream, as an asynchronous iterable iterator.

Example: Looping through frames

for await (const event of stream) {
if (event.type === SpeechEventType.FINAL_TRANSCRIPT) {
console.log(event.alternatives[0].text)
}
}

Remarks

This class is abstract, and as such cannot be used directly. Instead, use a provider plugin that exports its own child SpeechStream class, which inherits this class's methods.

Hierarchy (view full)

Constructors

Methods