AAI SDK
    Preparing search index...

    Type Alias TtsEvents

    Events emitted by an open TtsSession.

    type TtsEvents = {
        audio: (pcm: Int16Array) => void;
        done: () => void;
        error: (err: TtsError) => void;
    }
    Index
    audio: (pcm: Int16Array) => void

    One PCM16 audio chunk. Orchestrator forwards to the client.

    done: () => void

    Synthesis drained after flush() or cancel(). Emitted exactly once per turn, and never after cancel() for the cancelled turn: cancel() must clear any pending done timers/frames so a stale done cannot leak into the next turn's flush-wait (the event carries no turn id, so the pipeline transport cannot filter it — see pipeline-transport.ts).

    error: (err: TtsError) => void

    Terminal error. The session is expected to end after this fires.