> ## Documentation Index
> Fetch the complete documentation index at: https://spatialwalk-6179c111.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Speech-to-Avatar

> Run the Speech-to-Avatar demo directly from the official repository

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](https://github.com/spatialwalk/avatarkit-voice-agent-demo/tree/main/spatialreal-speech-to-avatar-quickstart)**
>
> Source code for this quickstart.

> **[Code Walkthrough](https://spatialwalk-6179c111.mintlify.site/guide/speech-to-avatar-walkthrough.md)**
>
> 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](https://spatialwalk-6179c111.mintlify.site/studio/aki-key.md#temporary-session-token))

**1. Clone the repo and enter the quickstart folder**

```bash theme={null}
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**

```bash theme={null}
cp .env.example .env
```

Update `.env` with your own values:

```bash title=".env" theme={null}
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**

```bash theme={null}
pnpm install
pnpm dev
```

Open `http://localhost:3000`, click **Connect Avatar**, then click **Send Audio**.

## Next

* Want to understand the code structure and runtime flow? See [Speech-to-Avatar Walkthrough](https://spatialwalk-6179c111.mintlify.site/guide/speech-to-avatar-walkthrough.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.