Skip to content
animorio
IT
All components

Assistant voice selector

Pickers, Hover, TransitionsGSAP, Canvas, CSS onlyAdvancedCompressed weight: Demo 11 KBGSAP 28 KBFreeDownload the zip

The panel for choosing the voice of Vela, an AI assistant, on black: above, a sound wave of liquid chrome drawn on a canvas, below, four voices in a row of pills, Juniper, Atlas, Wren and Sol. Each voice has its own timbre and the wave melts from the shape of one into the next: soft and round, low and wide, quick and dense, clear and even. Once chosen, a voice speaks for two seconds: the wave swells in syllables, a metal light runs along it from left to right and the words of its line light up one by one. The metal pill reaches the chosen voice on a spring that runs past by just one pixel and settles.

The code

A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.

<!doctype html>
<!--
  "Assistant voice selector" from Animorio · https://animorio.com
  License: free on your own sites and your clients’ sites, paid work included.
  Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>The assistant voice selector with the liquid metal wave</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage" data-stage>
    <!-- the voice picker of Vela, an AI assistant: a wave of liquid metal that takes the timbre of the chosen voice,
         four voices in a row of pills, and a two second preview where the metal light runs along the wave -->
    <section class="voice" data-wrap aria-labelledby="voice-title">
      <span class="voice__glass" aria-hidden="true"></span>
      <header class="voice__head">
        <div class="voice__titles">
          <p class="voice__title" id="voice-title">Voice</p>
          <p class="voice__meta"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 1.8l1.5 4.2 4.3 1.5-4.3 1.5L8 13.2 6.5 9 2.2 7.5 6.5 6z"/></svg>Vela assistant</p>
        </div>
        <button class="play" type="button" data-play aria-label="Preview the voice">
          <span class="play__body" data-play-body>
            <span class="play__icon" aria-hidden="true">
              <svg class="play__ring" viewBox="0 0 24 24"><circle class="play__track" cx="12" cy="12" r="10.25"/><circle class="play__arc" data-arc cx="12" cy="12" r="10.25"/></svg>
              <svg class="play__tri" data-tri viewBox="0 0 24 24"><path d="M10 8.2v7.6c0 .5.5.8.9.5l5.6-3.8c.4-.3.4-.8 0-1.1l-5.6-3.7c-.4-.3-.9 0-.9.5z"/></svg>
              <svg class="play__bars" data-bars viewBox="0 0 24 24"><rect x="8.2" y="9" width="1.6" height="6" rx=".8"/><rect x="11.2" y="7.5" width="1.6" height="9" rx=".8"/><rect x="14.2" y="9.6" width="1.6" height="4.8" rx=".8"/></svg>
            </span>
            <span class="play__label" data-play-label>Preview</span>
          </span>
        </button>
      </header>

      <div class="wave" aria-hidden="true">
        <canvas class="wave__canvas" data-wave></canvas>
      </div>

      <p class="voice__line" data-line aria-hidden="true"></p>

      <div class="pills" role="radiogroup" aria-labelledby="voice-title" data-pills>
        <span class="pills__thumb" data-thumb aria-hidden="true"><span class="pills__sheen" data-thumb-sheen></span></span>
        <button class="pill" type="button" role="radio" aria-checked="true" data-pill>Juniper</button>
        <button class="pill" type="button" role="radio" aria-checked="false" data-pill>Atlas</button>
        <button class="pill" type="button" role="radio" aria-checked="false" data-pill>Wren</button>
        <button class="pill" type="button" role="radio" aria-checked="false" data-pill>Sol</button>
      </div>

      <footer class="voice__foot">
        <p class="voice__desc" data-desc>Soft and warm, an unhurried pace</p>
        <p class="voice__hz" data-hz>164 Hz</p>
      </footer>
    </section>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2l13.4 8.1-6 1.1 3.4 6.9-2.6 1.3-3.4-6.9L5.4 17.8z"/></svg>
    <p class="sr" aria-live="polite" data-live></p>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="script.js"></script>
</body>
</html>

Playground

Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.

29 values to change

Or ask your AI assistant for it

With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:

Take “Assistant voice selector” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On black, alone, sits the dark glass panel for choosing the voice of Vela, an AI assistant: at the top Voice with the small lilac star of Vela assistant and the Preview button on the right, in the middle a sound wave made of liquid chrome, below it the line the voice will say, then a row of four pills, Juniper, Atlas, Wren and Sol, and at the bottom a line saying what the voice is like and its pitch in hertz. The wave is a ribbon of metal, light at its edges and dark in the middle like a chrome tube, with two reflections flowing in opposite directions and a thread of lilac. Each voice has its own timbre: Juniper is soft and round, Atlas low and wide, Wren quick and dense with ripples, Sol clear and even; changing voice the wave does not jump but melts from one shape to the next in just under a second, and the hertz roll to the new number. As soon as it is chosen, the voice speaks for two seconds: the wave swells in syllables, a band of light runs along it from left to right, the thin ticks below light up as it passes, the glass of the panel brightens slightly from the top, the words of the line light up one by one with a little hop and a thin ring fills around the button, which meanwhile shows three dancing bars. The metal pill slides onto the chosen voice on a spring worked out from the distance, so it runs past by just one pixel and comes back; while running it stretches and thins like a drop, and the chosen name widens on the wdth axis. Pressed, the pills and the button sink and come back on an elastic. Until someone touches it, a drawn pointer presses Preview, then tries Wren, Atlas, Sol and goes back to Juniper.

How it works

Timbre in numbers

Each voice is a small object: three ripples along the wave with their frequency and weight, the speed they travel at, a grain of fine ripples, the height, how full the belly is (the exponent of the sine window) and the syllables per second. Changing voice GSAP takes all these numbers from the old ones to the new with power3.inOut, and the wave melts by itself from one shape into the next because it is redrawn every frame with the numbers of that moment.

The chrome ribbon

The canvas draws the top edge and, coming back, the bottom one, which is a slightly different breath of the first so the ribbon does not look like a mirror. A vertical gradient fills it, from the light of the edges to the dark of the middle, measured on the height of the wave at that moment: it looks like a metal tube at any amplitude. Then, clipped to the ribbon and in lighter mode, two bands of light going opposite ways: where they cross the metal looks wet.

Two seconds of voice

While it speaks, the level follows a target made of syllables (a sine to the power of 0.7 at the voice’s pace, times a slower phrase) inside an envelope that rises and falls, and follows it on a spring, so syllables swell instead of jumping. The band of light runs from left to right in PREVIEW seconds, the ticks below light up near it, and the words of the line light up as the voice reaches their part.

The one pixel spring

The pill has a damped spring integrated by hand in two half steps per frame. The damping is worked out from the distance at each choice: for a jump of d pixels the overshoot fraction is OVERSHOOT/d, and zeta is minus the log of that fraction over the square root of pi squared plus the log squared. So it runs past by one pixel for a short jump and a long one alike. Its speed stretches it and thins it in scaleY.

The drawn pointer

From the load event a timeline takes an SVG pointer to Preview, then to the other three voices and back to the first, each time waiting for the voice to finish speaking. When the real mouse comes over the loop stops and starts again shortly after it leaves; at the first click or key it stops for good. The arrow keys change voice as in a radiogroup.

Values to change

NameFileDefaultWhat it changes
VOICEscript.js0The voice chosen when the page opens: 0 Juniper, 1 Atlas, 2 Wren, 3 Sol.
PREVIEWscript.js2How many seconds the voice speaks in its preview.
SPRINGscript.js1How stiff the spring of the metal pill is.
OVERSHOOTscript.js1How many pixels the pill runs past the chosen voice before it settles.
FLOWscript.js1How fast the light drifts along the metal when the voice is quiet.
DETAILscript.js140How many points draw the wave.
MORPHscript.js0.9How many seconds the wave takes to melt into the shape of the new voice.
AUTOscript.jstrueThe drawn pointer tries the voices by itself until someone touches them.

Try them in the Playground

When to use it

For an app or site with an AI assistant that speaks, for the settings of a text to speech or audiobook service, for the onboarding of a voice app: it lets the eyes hear the difference between the voices before choosing, even without sound.

On phones

On the phone the panel takes almost the whole width, the wave gets lower with the screen height and the pills stay four in a row with slightly smaller words; there is no hover, so a voice is tried by tapping it.

With reduced motion

Nothing moves: the wave stays still in the shape of the chosen voice and changes to the new one with a fade, the light does not run, the pill appears on the new voice with a fade, the words light up only in colour and the hertz change in place.

Pitfalls

  • With a fixed-damping spring the pill bounced four pixels going from Juniper to Sol and not even half a pixel between neighbours: the damping is worked out again from the distance at each choice.
  • A fixed vertical gradient made the small wave all dark grey and the big one striped: it is measured on the height of the wave at every frame.
  • The wave with a bottom edge equal to the top one looked like a fake mirror: the bottom edge has its own slightly different breath.
  • The level following the syllables directly made the wave jump in jerks: it follows them on a spring.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 11 KB; the libraries: GSAP 28 KB.

Testing

Tested on 11 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.

All components