spatius_avatar_python extension receives agent speech audio inside that graph, sends it to Spatius, and configures Motion Server to publish synchronized audio and motion data into the configured Agora channel.
If you start a managed Agora Convo AI agent through the REST API, use Convo AI Agent instead. In that path, Spatius is configured through the Convo AI properties.avatar provider block.
spatius_avatar_python
TEN extension source in the TEN Framework repository.
How it works
- Your TEN graph runs the voice agent pipeline.
- The TTS stage sends PCM audio frames to
spatius_avatar_pythonthroughpcm_frame. spatius_avatar_pythonstarts a Motion Server session withAgoraEgressConfig.- Motion Server publishes synchronized avatar audio and motion data into the Agora channel.
- Your client joins the same channel and renders the avatar with
AgoraProvider.
For avatar speech audio source and timing guidance, see Audio.
Configure
Required fields
Optional fields
Token behavior
spatius_avatar_python accepts either a prebuilt Agora RTC token or an App Certificate:
- If
params.agora_tokenis set, the extension uses it directly. - If
params.agora_tokenis empty andparams.agora_appcertis set, the extension generates a token forparams.agora_uid,params.agora_channel, andparams.session_expire_minutes.
Graph wiring notes
Placespatius_avatar_python after the stage that produces final avatar speech audio. It expects PCM audio frames at the configured sample rate and sends those bytes to Spatius without resampling.
Use the same Agora channel on both sides:
The extension uses
new_avatar_session() from the Spatius Python SDK and configures:
yieldAudioData() or yieldFramesData() manually; AgoraProvider owns the channel-to-renderer data flow.
Next steps
Overview
Review the end-to-end Agora Convo AI architecture.
Convo AI Agent
Configure Spatius in the managed Convo AI start-agent request.
Client
Join the Agora channel and render avatar output with
AgoraProvider.
