Websockets
Simli React SDK (Deprecated)
Simli React SDK to handle LipsyncStream WebSockets
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={ } />
ref
React reference to the componenet to access the sendAudioDataToLipsync(audioData)
function where we feed audio data of type Uint8Array
start
Set to true to start streaming
sessionToken
Holds the faceId and session metadata, get session_token through here
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 Size | Small chunk size |
---|---|
Less Audio Artifacts | More Audio Artifacts |
Higher Latency | Lower Latency |
Note: 1 chunk adds 33ms latency to the stream.