Streaming synthesis: the input is split into sentences, and each sentence is synthesized by one streamed request as soon as it is complete. Every flush ends a segment.

Remarks

The input is read once, into sentences that outlive a failed attempt, so a retry resumes at the sentence that failed instead of finding the input already consumed. A sentence is only retried when none of its audio has been received, so a retry never repeats speech that already played.

Hierarchy (view full)

Constructors

Properties

label: string = 'speechify.SynthesizeStream'
END_OF_STREAM: typeof END_OF_STREAM

Accessors

  • get abortSignal(): AbortSignal
  • Returns AbortSignal

Methods

  • Close both the input and output of the TTS stream

    Returns void

  • Mark the input as ended and forbid additional pushes

    Returns void

  • Flush the TTS, causing it to process all pending text

    Returns void

  • Parameters

    • text: string

    Returns void

    Deprecated

    Use updateInputStream instead

  • Parameters

    • text: ReadableStream<string>

    Returns void