Table of contents / Vol. 01
04 / Developer field notes

Map an AI assistant’s conversational states

Connect listening, thinking, speaking and recovery animation to actual application events without inventing progress.

Integration planning guide. The snippet is an application-level pattern, not a verified Rive SDK example. Connect it through the API supported by your actual file and installed runtime.

Distinguish waiting from listening

Listening means the product is capturing input. Thinking means the request is in flight. Show separate labels and poses so a user knows whether to speak, wait or retry. Permission failure should never look like active recording.

Let playback own speaking

A response arriving is not the same as audio playing. Enter speaking when playback starts and leave it on completion, cancellation or error. If audio level drives a mouth, smooth and clamp it before passing it to the visual layer.

Design for interruption

Users can change their minds while an assistant is working. Cancellation should stop the old visual sequence and return to a coherent pose. Test late events from a cancelled request so they cannot restart speaking.

A small starting point

// Ignore a late response from an obsolete turn.
export function belongsToCurrentTurn(event, activeTurnId) {
  return event.turnId === activeTurnId;
}

Before calling it done

  • Record the exact runtime version and exported asset used in validation.
  • Test the normal sequence, an interruption, a failed load and screen re-entry.
  • Confirm the same information remains readable with reduced motion or no animation.

Use the official Rive runtime documentation for current APIs and feature support.