minimax-speech-ts
    Preparing search index...

    Interface SynthesizeStreamResult

    interface SynthesizeStreamResult {
        audio: ReadableStream<Buffer<ArrayBufferLike>>;
        extraInfo: Promise<ExtraInfo | undefined>;
        subtitle: Promise<string | undefined>;
        traceId: Promise<string | undefined>;
    }
    Index

    Properties

    audio: ReadableStream<Buffer<ArrayBufferLike>>
    extraInfo: Promise<ExtraInfo | undefined>

    Resolves to the parsed extra_info (audio length, size, billable characters, etc.) carried by the final aggregated chunk; undefined if no final chunk arrived (stream ended early, API error, transport error, consumer cancellation) or its extra_info was absent/malformed. Never rejects.

    Important: like subtitle, this only settles once the audio stream is being consumed. Awaiting it before reading or cancelling audio will hang. Drain audio first (or in parallel via Promise.all).

    subtitle: Promise<string | undefined>

    Resolves to the subtitle file URL when subtitles were enabled and a final chunk arrived with one; undefined otherwise (subtitles disabled, stream ended early, API error, transport error, or consumer cancellation). Never rejects.

    Important: this promise only settles once the audio stream is being consumed. Awaiting subtitle before reading or cancelling audio will hang because nothing is pumping the underlying SSE source. Drain audio first (or in parallel via Promise.all).

    traceId: Promise<string | undefined>

    Resolves to the trace_id of the final aggregated chunk (used for MiniMax support / troubleshooting); undefined on the same early-completion paths as extraInfo. Never rejects. Same "consume audio first" caveat as subtitle.