Skip to main content
Use this quickstart to run a ready-made Speech-to-Avatar demo in a few minutes. This page focuses on running the demo fast. Code-level explanation is in the Guide page.

GitHub Repository

Source code for this quickstart.

Code Walkthrough

File-by-file explanation of the implementation.

Prerequisites

  • Node.js 18+
  • pnpm
  • SpatialReal credentials:
    • VITE_SPATIALREAL_APP_ID
    • VITE_SPATIALREAL_AVATAR_ID
    • VITE_SPATIALREAL_SESSION_TOKEN (how to generate)
1

Clone the repo and enter the quickstart folder

git clone https://github.com/spatialwalk/avatarkit-voice-agent-demo.git
cd avatarkit-voice-agent-demo/spatialreal-speech-to-avatar-quickstart
2

Create env file

cp .env.example .env
Update .env with your own values:
.env
VITE_SPATIALREAL_APP_ID=your_app_id # https://app.spatialreal.ai/apps
VITE_SPATIALREAL_AVATAR_ID=your_avatar_id # https://app.spatialreal.ai/avatars/library
VITE_SPATIALREAL_SESSION_TOKEN=your_temporary_session_token # https://app.spatialreal.ai/apps -> details -> Generate Temporary Token
3

Install and run

pnpm install
pnpm dev
Open http://localhost:3000, click Connect Avatar, then click Send Audio.

Next