Overview

The simli-react-sdk is an npm package with a single component < SimliFaceStream /> to handle incoming audio playback and Lipsync on frontend.

Component Parameters

< SimliFaceStream ref={ } start={ } sessionToken={ } minimumChunkSize={ } />
  1. ref

React reference to the componenet to access the sendAudioDataToLipsync(audioData) function where we feed audio data of type Uint8Array

  1. start

Set to true to start streaming

  1. sessionToken

Holds the faceId and session metadata, get session_token through here

  1. minimumChunkSize

Minimum chunk size needed from LipsyncStream to start decoding and playing audio and video. We recommend setting the minimumChunkSize to 8 chunks for nice audio quality and low latency.

Big chunk SizeSmall chunk size
Less Audio ArtifactsMore Audio Artifacts
Higher LatencyLower Latency

Note: 1 chunk adds 33ms latency to the stream.

Flowchart