Speech-to-Speech

Voice conversation from an Experience without avatar rendering.

What is it?

Speech-to-speech is voice conversation through the same Avatar Experience runtime: listen → think → speak. Set speechOnly on <Experience> or Experience.startSession() to run the full conversational pipeline (STT, LLM, TTS) without avatar or location visuals.

You get a voice-first session — microphone permission, audio output, and transcript-style UI in the hosted player — not a talking character on screen.

When to use it

  • Voice assistants and phone-style flows
  • Products where audio is the primary interface
  • Low-bandwidth embeds that still use the hosted player for mic and audio
  • Real dialogue managed by the experience agent, not single scripted speak() lines

For predetermined lines only, use presenter mode instead — see Text-to-Speech.

Svelte

speechOnly with conversation mode and automatic or manual speech input. Subscribe to onMessage or other callbacks as needed.

VoiceAssistant.svelte
<Experience
  experienceId="exp_T0I7ACMQLBMPG6K"
  speechOnly
  mode="conversation"
  speechInputMode="auto"
  onMessage={(message) => console.log(message.role, message.text)}
/>

JavaScript

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

const experience = await Experience.startSession({
  experienceId: 'exp_T0I7ACMQLBMPG6K',
  speechOnly: true,
  mode: 'conversation',
  speechInputMode: 'auto'
});

experience.on('message', (evt) => {
  console.log(evt.data.role, evt.data.text, evt.data.status);
});

await experience.attach({ container: '#voice-shell' });

Subscribe to message, userTranscript, and other events as documented in Events. Pipeline placement (browser vs cloud STT/LLM/TTS) is configured on the project and experience at authoring time.

Server sessions

When using sessionEndpoint, forward speechOnly: true in your BFF POST body to POST /v1/sessions so the minted session matches the client flag. See Server sessions.

When to add a visible character

Remove speechOnly to use the same experience with on-screen animation. Integration surface stays the same — only rendering and asset loading change.