Get Started
Use our simli-client sdk to start streaming
Key Concepts
-
API Key: Our endpoint require an API key which you can easily obtain by creating an account at Create an account. The API key makes it easier for you to track your usage and control who has access to Simli.
-
Faces: All our available Avatar faces can be accessed through: Available Faces. We are continously adding new ones.
-
simli-client: Stream PCM16 audio bytes to our SDK to start recieving media.
Start Building
API Key
In order to use our API you need to get your apiKey
first.
Create an account, log in
and in your profile you can view your API Key.
Import simli-client
Import the simli-client
package to your project.
npm install simli-client
Check on GitHub: simli-client
Initialize and start streaming
- Create a React ref and pass it to the video and audio
<video ref={videoRef} autoPlay playsInline ></video>
<audio ref={audioRef} autoPlay ></audio>
- Initialize SimliClient and pass in the video and audio ref
const simliClient = new SimliClient();
const SimliConfig = {
apiKey: SIMLI-API-KEY,
faceID: FACE-ID,
handleSilence: true,
videoRef: videoRef,
audioRef: audioRef,
};
simliClient.Initialize(SimliConfig);
- Call start function to Setup WebRTC connection
simliClient.start();
- Stream audio using
sendAudioData()
AudioData should be of type PCM16
and sample rate 16KHz
// Example: sending empty audio data
const emptyAudioData = new Uint8Array(6000).fill(0);
simliClient.sendAudioData(emptyAudioData);
If done successfully, you will recieve media to be rendered on your frontend.
Working example
Clone our demo repo to get started with a working example.
simli-ai-agent-demo
A simple demo demonstrating use of simli-client with OpenAI for LLM and ElevnLabs for speech