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.

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.

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.