Integrations
Custom STT/LLM/TTS
Integrate Trulience avatars with a pre-existing STT/LLM/TTS setupIntroduction
You can use the Trulience SDK to make your avatar lip sync to audio from your own pipeline, like a custom text-to-speech engine, speech-to-text service, or language model. Pass your MediaStream
to the SDK using setMediaStream()
.
Dashboard Configuration
To use your own audio, open your avatar’s settings in the Trulience dashboard. On the BRAIN tab, set “Service Provider or Framework” to None. This turns off built-in speech-to-text and LLM, so you can provide your own.
Usage
After you initialize the Trulience SDK, call setMediaStream()
with your own MediaStream (for example, from a TTS engine or the Web Audio API):
// Your custom MediaStream
const myMediaStream = ...;
// After initializing Trulience
trulience.setMediaStream(myMediaStream);
See the setMediaStream()
method in the SDK documentation for details.
Integration Steps
- Set your avatar’s provider/framework to None in the dashboard.
- Initialize the Trulience SDK (see the SDK Getting Started guide).
- Get or create your own MediaStream.
- Call
setMediaStream()
with your stream. - The avatar will lip sync to your audio.
Tips and troubleshooting
- Your MediaStream should have a valid audio track.
- Make sure the stream is active and works in your browser.
- If something isn’t working, check the browser console for errors about media permissions or stream format.