API · Render mode
Expressions
Lip sync, blinking, breathing and the idle and listening looks always run on their own. On top of them you choose the expression for what is being said, with as little or as much control as you want.
Expression names
apology, authority, concern, confidence, curiosity, decline, discomfort, enthusiasm, playful, question, reflective, surprise, thinking, thoughtful, warmth, welcome
Three ways to set them
1. Do nothing
Send text (with agent.speak_text, or as the text of your audio) and the avatar picks an expression for each sentence, as it does in its own conversations. Audio without any text gets a neutral speaking manner.
2. Tags in the text
Put a name in square brackets, [warmth], or between double colons, ::warmth::. A tag applies to its sentence and carries on until the next one. Tags are never spoken, and bracketed words that aren't expression names are left alone.
{"type": "agent.speak_text",
"text": "[welcome] Hi, I'm Ava. [curiosity] What brings you in today?"}With your own voice, remove the tags before your speech engine reads the text, and send the tagged text as the audio's text:
Python
import re
CUE = re.compile(r"\[(apology|authority|concern|confidence|curiosity|decline|discomfort|"
r"enthusiasm|playful|question|reflective|surprise|thinking|thoughtful|"
r"warmth|welcome)\]|::\w+::")
reply = "[warmth] Of course! [question] Which day suits you?"
spoken = CUE.sub("", reply).strip() # give this to your own voice
# ...stream your voice's audio with {"type": "agent.speak", "audio": ..., "text": reply}3. Exact timing
agent.cue sets an expression from at_seconds into the current or next utterance (default: now, or the start of the next one), until the next cue. intensity runs from 0 to 1. Use it with your speech engine's word timestamps. A cue overrides tags and the automatic choice.
{"type": "agent.cue", "cue": "surprise", "intensity": 0.8, "at_seconds": 1.4}In the voice too
- •The default for sentences without a tag can be set per message with
cueonagent.speak_text.