AIVoiceGlow

fun AIVoiceGlow(state: AIVoiceAgentState, modifier: Modifier = Modifier, colors: List<Color> = AIVoiceVisualizationDefaults.colors(), expressivity: Float = 1.0f, audioLevel: () -> Float?? = null, rendering: AIVoiceGlowRendering = AIVoiceGlowRendering.Auto)

A voice agent as a soft, airy globe: color masses orbit inside it and swell with speech, and the gaps between them let the background show through. Tapping the globe bounces it; drawn with the shader, it also ripples from the touch and under a hovering mouse or stylus.

It has no size of its own and draws in the middle of the space it is given, about half as wide as its shorter side, so give it a square.

Parameters

state

What the agent is doing, which sets how the glow moves.

modifier

The Modifier to be applied to the glow.

colors

One to five colors. Past five are ignored.

expressivity

From 0 to 2: how far and how fast it moves. Colors never change with it.

audioLevel

The level of whoever is talking, from 0 to 1, read once a frame. Feed it at 15 Hz or more for the glow to move with the words; null animates speech on its own.

rendering

How the glow is drawn. See AIVoiceGlowRendering.