Member Junction
    Preparing search index...

    Web Audio playout scheduler for raw PCM16 model audio at a driver-supplied sample rate.

    Chunks are wrapped in AudioBuffers and scheduled back-to-back against a playhead clock: each chunk starts at max(playheadTime, currentTime) and advances the playhead by its duration, producing gapless playout regardless of network jitter. IsPlaying is computed directly from that clock — the playhead being ahead of currentTime (with live sources) means audio is audibly coming out of the speaker. On interruption, Flush stops every scheduled source and rewinds the playhead.

    Generalized from the Gemini driver's original 24 kHz-fixed engine: the sample rate is now a constructor parameter so providers that negotiate their output format at session start (e.g. ElevenLabs' agent_output_audio_format) can construct the playout engine with the negotiated rate.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Accessors

    Methods

    Constructors

    • Parameters

      • sampleRate: number

        The PCM16 sample rate (Hz) of the chunks this engine will play (e.g. 24000 for Gemini Live, the negotiated agent_output_audio_format rate for ElevenLabs).

      Returns RealtimePcmPlayback

    Accessors

    Methods