Skip to main content
createStreamingSession() is the low-level streaming primitive on LipsyncClient. You feed it fixed-size audio windows and it returns one viseme result per window. Most React apps should use useLipsyncStream instead — it owns the audio graph for you. Reach for the raw session when you control the audio source yourself (a custom worklet, a Node pipeline, a non-React app).

The window contract

pushWindow resolves to a LipsyncStreamingFrameResult:

Drive the avatar

Append each result to a streaming MascotPlayback. offset is the audio-position in ms; the playback’s animation-frame clock fires the viseme when its time arrives.

Silence handling

silenceDetected reflects the SDK’s internal −50 dBFS input-amplitude silence gate. It suppresses the phantom mouth shapes a naive pipeline would emit during the inference tail after speech stops — you do not implement your own gate. Treat silenceDetected: true windows as “mouth at rest”.

Barge-in and interruption

To cut a response short (the user interrupts), stop feeding windows and reset playback:
If your audio arrives as raw PCM from a network source, pair createPCMStreamPlayer (which plays it gap-tolerantly and exposes a MediaStream) with useLipsyncStream rather than hand-windowing — that handles buffering and the tap for you.

React equivalent

useLipsyncStream({ source: { kind: "manual" } }) wraps a streaming session and exposes pushAudio / pushBase64PCM16 / reset, while keeping the audio graph stable across renders. Prefer it in React; use the raw session only when you need full control of the window loop.

Next

Core client

init, processAudio, events.

PCM stream player

Play + tap raw PCM.

Streaming & mic (React)

The React wrapper.