Text-to-Avatar

Animate an avatar speaking your text.

What is it?

Send text. Liforma returns a speaking, animated avatar — lip-synced audio and facial animation for known script, without a full conversational loop.

When to use it

  • Scripted avatar announcements or lesson intros
  • Onboarding walkthroughs with a character guide
  • Dynamic text you already have — no user speech input required
  • When you do not need the character to listen, reason, or update state

API

For animated speech inside a live session, use Experience.speak() in presenter mode (or managed conversation). The standalone Liforma.textToAvatar() helper described below is aspirational — shipped today via the Experience speak path.

const experience = await Experience.startSession({
  experienceId: 'exp_…',
  mode: 'presenter'
});

experience.on('started', async () => {
  await experience.speak({ text: 'Hello! Welcome to the lesson.' });
});

await experience.attach({ container: '#avatar' });

See Experience API for startButton, manual listening, and speech lifecycle events.

Standalone animation (planned)

import { Liforma } from '@liforma/client';

const result = await Liforma.textToAvatar({
  avatarId: 'ava_c4e71fe5',
  text: 'Hello! Welcome to the lesson.',
  voiceId: 'en-GB-SoniaNeural'
});

// result.audio — speech audio
// result.stream — optional streaming chunks

Animation is rendered by the hosted player — this standalone helper returns audio (and optional streaming chunks), not viseme or blendshape data for custom renderers.

When to use Avatar Experiences instead

Use an Avatar Experience when the character should listen, think, respond dynamically, use tools, or maintain session state. Text-to-Avatar is a focused building block; Avatar Experiences are the full intelligent character platform.

Today, animated conversation is delivered through Avatar Experiences. Text-to-Avatar is for developers who only need scripted animation output.