API Specification

Ingress

gRPC API

The Animation Graph microservice can accept an input animation data stream from an animation data source (e.g. Audio2Face). This animation data stream is provided through the PushAnimationDataStream remote procedure call (RPC). The animation graph then blends the final animation and generates a new animation data stream that can be streamed to a downstream renderer. These renderers connect to the Animation Graph microservice renderer through the PullAnimationDataStream RPC. Both RPCs are defined in the Animation Data Service.

Animation Data Stream Audio Format

The Animation Graph microservice currently only supports animation data streams with the following audio format.

Format

PCM

Channel Count

1

Sample Rate

16000 Hz

Bit Per Sample

16

HTTP API

In addition to the animation data stream APIs, the Animation Graph microservice also exposes an HTTP API. With this API you can:

  • Control the values of animation graph variable, e.g. to control postures and gestures of the default animation graph.

  • Add and remove active streams to the microservice.

You can find more information in the HTTP API documentation.

An interactive HTTP API overview can be accessed once the microservice has been started at http://localhost:8020/docs.

Animation Graph Variable Control

Please note that the HTTP API routes are generated dynamically when the Animation Graph microservice starts. It loads the Custom Layer Data from the USD scene file and generates the endpoint paths accordingly.

Thus, the HTTP API exposed by the microservice depends on the animation graph variable configuration contained in the USD scene file. The HTTP API documentation for the default animation graph is provided here as a reference.

Please see the default animation graph section for example API calls to change animation graph variables.

Stream Management

The Animation Graph microservice is a stateful service, which only generates an output animation data stream after a stream has been registered with a stream ID.

An animation data stream can be added with:

stream_id=$(uuidgen)
curl -X POST -s http://localhost:8020/streams/$stream_id

Similarly, an animation data stream can be removed with:

curl -X DELETE -s http://localhost:8020/streams/$stream_id