Trulience Docs
Custom STT/LLM/TTS

Integrations

Custom STT/LLM/TTS

Integrate Trulience avatars with a pre-existing STT/LLM/TTS setup
For LLMs

Introduction

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

  1. Set your avatar’s provider/framework to None in the dashboard.
  2. Initialize the Trulience SDK (see the SDK Getting Started guide).
  3. Get or create your own MediaStream.
  4. Call setMediaStream() with your stream.
  5. 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.