Skip to main content

Prerequisites

  • API key
  • Console endpoint URL
  • Ingress endpoint URL
  • Avatar ID
  • Your existing transport mechanism to stream audio and binary data from you server to your client application.

Ingress endpoint versions (v1 vs v2)

There are currently two ingress endpoint URL formats:
  • Ingress v2 (recommended): https://api.<region>.spatialwalk.cloud/v2/driveningress
  • Ingress v1 (deprecated): https://api.<region>.spatialwalk.cloud/v1/driveningress
SDK support currently differs by language:
  • Golang SDK: supports v1 and v2
  • Python SDK: supports v2 only
We are still in rapid iteration: v2 SDKs for Go and other languages will be available soon. Ingress v1 is deprecated and will be removed in the future. For the complete details, see Ingress API Versions.

Overview

Our avatar server SDK enables seamless integration of avatar functionalities into your server-side applications. It provides a straightforward way to manage avatar sessions, stream input and output of audio data and avatar animation data.
You need to use this server SDK together with our client side SDK(s).

Steps

Five main steps are involved in using the server SDK:
  1. Create the session: Set up the session with your API key, endpoint URLs, avatar ID, expiration time, and define callbacks for handling transport frames, errors, and session closure.
  2. Initialize the session: Prepare the session for starting the connection, the SDK will make HTTP request to generate a sessionToken.
  3. Start the session: Establish the connection to the avatar service, enabling audio data transmission and receiving avatar animation data.
  4. Send audio data: Stream audio data to the avatar service for processing.
  5. Close the session: Properly terminate the session when done.
Host mode sequence

Important Notes

  • Ensure that the expiration time is set appropriately (before now + 24 hours).
  • We currently only support PCM 16-bit mono audio at 16kHz.

Detailed Example per Language

Golang SDK

We have a dedicated guide for using the Golang SDK. Please refer to the Golang SDK page for detailed instructions and code examples.

Python SDK

We have a dedicated guide for using the Python SDK. Please refer to the Python SDK page for detailed instructions and code examples.