AAI SDK
    Preparing search index...

    Interface SttSession

    Host-side handle to one open STT provider stream (pipeline mode). Produced by the host's provider resolver at session start; user code never constructs one.

    interface SttSession {
        close(): Promise<void>;
        on<E extends keyof SttEvents>(event: E, fn: SttEvents[E]): Unsubscribe;
        sendAudio(pcm: Int16Array): void;
        updateAgentContext?(text: string): void;
    }
    Index
    • Returns Promise<void>

    • Push one PCM16 audio frame from the client into the transcriber.

      Parameters

      • pcm: Int16Array

      Returns void

    • Push the agent's latest reply text mid-stream so the next user turn is transcribed with that context (e.g. AssemblyAI's agent_context, gated to models that support it). Optional: providers that have no equivalent simply omit it, and callers must use ?.() to invoke it.

      Parameters

      • text: string

      Returns void