Class ChunkedStreamAbstract

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

Example: Looping through frames

for await (const event of stream) {
await source.captureFrame(event.frame);
}

Remarks

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

Hierarchy

  • ChunkedStream

    Implements

    Constructors

    Methods

    • Collect every frame into one in a single call

      Returns Promise<AudioFrame>