js-tts-wrapper
Version:
A JavaScript/TypeScript library that provides a unified API for working with multiple cloud-based Text-to-Speech (TTS) services
9 lines (8 loc) • 437 B
TypeScript
import type { Readable } from "node:stream";
/**
* Reads a ReadableStream<Uint8Array> (Web) or NodeJS.ReadableStream completely
* and returns its contents as a single Buffer (in Node.js) or Uint8Array (in Browser).
* @param stream The stream to read.
* @returns A promise that resolves with the stream contents.
*/
export declare function streamToBuffer(stream: ReadableStream<Uint8Array> | Readable): Promise<Buffer | Uint8Array>;