Skip to content
animorio
IT
Back to the library

Voice note transcript

Transitions, HoverGSAP, CSS onlyMediumCompressed weight: Demo 7.8 KBGSAP 28 KBFreeDownload the zip

A minimal transition, a real piece of interface: in the chat of an invented AI notes app you press the voice note and the bars of its wave stretch sideways and fly to become the lines of the transcript, while the bubble grows to the size of the text on a spring and the words light up one at a time. Back plays the gesture in reverse.

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>
<!--
  "Voice note transcript" 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>From the voice note to its transcript, the bars becoming lines</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/geist@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage">
    <!-- the chat of Mira, the notes assistant of an invented app, Fieldnote. The last message is a voice note:
         pressing it, the bars of its wave stretch sideways into the lines of the transcript, the bubble grows to the
         size of the text on a spring and the words light up one by one. Back plays the same gesture in reverse -->
    <section class="chat" data-chat aria-label="Chat with Mira">
      <header class="chat__head">
        <span class="chat__avatar" aria-hidden="true">
          <svg viewBox="0 0 20 20"><path d="M10 2.6c.5 3.9 3.5 6.9 7.4 7.4-3.9.5-6.9 3.5-7.4 7.4-.5-3.9-3.5-6.9-7.4-7.4 3.9-.5 6.9-3.5 7.4-7.4z"/></svg>
        </span>
        <span class="chat__who">
          <span class="chat__name">Mira</span>
          <span class="chat__sub">Fieldnote assistant</span>
        </span>
      </header>

      <div class="chat__log">
        <p class="msg" data-ai>Morning. What should go in Friday’s launch note?</p>

        <div class="voice" data-voice>
          <button class="bubble" type="button" data-bubble aria-expanded="false" aria-label="Voice message, 9 seconds. Show the transcript">
            <span class="bubble__row" data-row>
              <span class="bubble__play" data-play aria-hidden="true">
                <svg viewBox="0 0 16 16"><path d="M5.4 3.6v8.8c0 .5.5.8.9.5l6.6-4.4c.4-.3.4-.8 0-1.1L6.3 3.1c-.4-.3-.9 0-.9.5z"/></svg>
              </span>
              <span class="bubble__wave" data-wave></span>
              <span class="bubble__time" data-time aria-hidden="true">0:09</span>
            </span>
            <span class="bubble__bars" data-bars aria-hidden="true"></span>
            <span class="bubble__sheen" data-sheen aria-hidden="true"></span>
            <span class="bubble__text" data-text aria-hidden="true">Lead with the offline mode, then the new export. Keep it under a hundred words and mention the beta ends Sunday.</span>
          </button>

          <div class="voice__meta">
            <span class="meta__hint" data-hint>
              <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 5h10M3 8h7M3 11h9"/></svg>
              Tap to transcribe
            </span>
            <span class="meta__done" data-done>
              <span class="meta__note">Transcribed from 0:09</span>
              <button class="meta__back" type="button" data-back tabindex="-1">
                <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M9.8 4.2L6 8l3.8 3.8"/></svg>
                <span>Back</span>
              </button>
            </span>
          </div>
        </div>
      </div>

      <footer class="chat__composer" aria-hidden="true">
        <span class="composer__field">Ask Mira anything</span>
        <span class="composer__mic">
          <svg viewBox="0 0 20 20"><rect x="7.4" y="3" width="5.2" height="9" rx="2.6"/><path d="M4.8 9.6a5.2 5.2 0 0 0 10.4 0M10 14.8V17"/></svg>
        </span>
        <span class="composer__send">
          <svg viewBox="0 0 20 20"><path d="M10 15V5.4M5.8 9.4L10 5.2l4.2 4.2"/></svg>
        </span>
      </footer>
    </section>
    <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.

28 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 “Voice note transcript” 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 a very light grey sits the white chat of Mira, the assistant of an invented notes app, Fieldnote: at the top the violet tile with the four point star, the name and the line ‘Fieldnote assistant’, at the bottom the ‘Ask Mira anything’ field with the microphone and the black send button. Mira asks, in a grey bubble, ‘Morning. What should go in Friday’s launch note?’; the answer is our voice note, an indigo and violet bubble with a tighter bottom right corner: the white play button, a wave of twenty-one bars, one for each spoken word and as tall as the word is long, and the time, 0:09; below, in grey, ‘Tap to transcribe’. Pressing it, the bubble gives under the finger and comes back on a spring, play and time fade out as they shrink, and the bars flatten and stretch sideways while staying in their row; then one after another they fly to the place of their word and become light lines, row by row, while the bubble grows to the left and down on a spring that passes the mark by a couple of pixels and settles (its top right corner never moves, so the lines do not sway with it). The words light up one at a time over their line, with a pixel of rise and a small glow that fades, and the line under them goes away; at the end a band of light crosses the bubble and below appear ‘Transcribed’ and the Back pill with its small arrow. Back plays the gesture in reverse: the words go out from the last, the lines go back in a row, stand up again as bars and the bubble shrinks; play, time and the line below come back. With the mouse over the voice note a ripple runs along the bars. Left alone the chat repeats the loop; with the mouse, a finger and the keyboard it really works.

How it works

One bar per word

The script splits the transcript into words and makes one bar for each: the wave is made of the words themselves, its height taken from the word’s length plus a small fixed offset so it does not look like a staircase.

Everything hangs from the top right corner

The play row, the bars’ layer and the text are absolute and pinned to the bubble’s top right corner, the one that never moves: the bubble grows left and down on its spring and the lines stay still where they belong.

Measuring both shapes

Before the gesture both shapes are measured: the bars in the wave and the words in the text, with offsetLeft and offsetTop (not getBoundingClientRect, which would count GSAP’s offsets). Every bar knows where it sits as a voice bar, as a flattened line and as the line of its word.

Two beats to become lines

First the bars flatten to the height of a line and stretch sideways while staying in their row, then they fly to their word: x and width on a damped spring, y on a soft ease, so they climb rows without bouncing up and down.

The words and the way back

Each word lights up over its line with a glow that fades (text-shadow) and a pixel of rise, and the line goes a moment later. Back builds the reverse timeline from the sizes of that moment, so it works after the window changes size too.

Values to change

NameFileDefaultWhat it changes
SPEEDscript.js12 = the whole gesture twice as fast, 0.5 = half.
BUBBLE_DAMPINGscript.js0.72The spring of the bubble growing: lower passes the mark more before it settles.
LINE_DAMPINGscript.js0.8The spring of the bars flying to their words.
BAR_STAGGERscript.js0.018Seconds between one bar leaving and the next.
WORD_GAPscript.js0.055Seconds between one word lighting up and the next.
STRETCHscript.js2.6How much a bar stretches sideways before it flies, in times its width.
LINE_ALPHAscript.js0.36How visible the lines are before their word lights up.
HOLDscript.js2.8Seconds the transcript stays open in the loop on its own.
LOOPscript.jstrueTranscribes and goes back again and again.

Try them in the Playground

When to use it

For the chat of an AI assistant, a notes app, a messaging app or a meeting recorder: wherever a voice note has to turn into text without opening another screen.

On phones

The same transition with adapted sizes: the chat is as wide as the box and at most as tall as the screen, the transcribed bubble takes the width there is and the lines are worked out again; a finger presses the voice note and Back.

With reduced motion

No flying bars and no springs: on a press the bubble fades out and comes back already transcribed, with the words fading in; Back does the same towards the voice note.

Pitfalls

  • If the bubble grows from its top left corner, as a right aligned chat normally would, the lines sway with its spring: everything has to hang from the corner that never moves.
  • getBoundingClientRect also counts GSAP’s offsets on the words (the pixel of rise): the measures use offsetLeft and offsetTop.
  • The words are inline-block, one per span, with the space outside the span: that way the line is as wide as the word and does not include the space.

Libraries

GSAP 3.15.0, Geist (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 7.8 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 animations