Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.avaturn.live/llms.txt

Use this file to discover all available pages before exploring further.

Legacy. This demo uses the text-echo flow (avatar speaks text you push to it). For a voice-to-voice integration, follow the Quickstart instead.
The example-react demo integrates OpenAI’s chat completions with the Avaturn.Live SDK over the legacy text-echo flow. Users submit text inputs that either trigger an echo from the avatar or stream a GPT-4 response back through the avatar.

Components

  • OpenAI hook — manages the OpenAI client and streams responses.
  • TokenPopup — modal for entering the OpenAI API token.
  • SettingsForm — switches between Echo and OpenAI mode and captures API keys.
  • Home — mounts the avatar video and the input form.

Flow

  1. The user picks a mode (Echo or OpenAI) and provides API keys via SettingsForm.
  2. The avatar is initialized with the Avaturn.Live SDK.
  3. On submit, text is either passed straight to avatar.task(text) (echo) or streamed through OpenAI; each sentence chunk is pushed to avatar.task() as it arrives (see Streaming LLM output).