Live waveform

A React component in Beamline's Voice & audio category.

Loudness drawn as it happens: a scrolling history of the microphone (or any live source) or its spectrum, a calm processing state while words are finished, and a number readout under reduced motion. Draws only while there is sound to draw and it is on screen.

Use it for

  • Feedback while recording or dictating: the person sees they are heard.
  • A level preview next to a microphone choice.

Not for

Anatomy

  • canvas (bars)
  • baseline
  • edge fade
  • reduced-motion readout (meter bar and dB)

Variants

  • mode: scrolling (history moves toward the start), static (spectrum, bars rise in place)
  • size: any height via height

States

  • idle (flat baseline, no loop)
  • active (draws each frame from the source)
  • muted (no bars: "Muted" between two dashed rules, the shape of an empty waveform)
  • processing (the last frame breathes while words are finished)
  • reduced motion (a meter and a dB number, 4 updates a second)
  • off screen (stopped)
  • settling (the sound stopped: the last bars sink to the baseline in one ease, then the loop ends)
  • silent (a live microphone stream that hears nothing for four seconds: "No sound from this microphone" over the flat line, the same shape as muted, and ", no sound" in its spoken name; the first sound clears it; under reduced motion the readout says "No sound")

Keyboard

  • None: a live picture (role img). Its controls (record, mute) are separate buttons.

Motion

One canvas, one frame loop, running only while active, processing or settling, on screen and in a visible tab. When the sound stops the bars sink to the baseline over --pui-duration-standard and the loop ends; idle draws once. Reduced motion replaces the moving bars with a level meter and a number.

Props

PropTypeDefaultDescription
sourceMediaStream | LevelSource | (() => number) | null—What to listen to: a microphone stream, a LevelSource, or a 0–1 getter.
activebooleantrue when a source is givenDraw from the source. Default: true whenever a source is given.
processingboolean—After recording, while the last words are finished: the last frame breathes.
mutedboolean—
mode"scrolling" | "static""scrolling"scrolling: a history moving toward the start; static: the spectrum, rising in place.
heightnumber40Height in px. Default 40.
barWidth / gapnumber3 / 2
fadebooleantrueFade the bars out at both ends. Default true.
tone"accent" | "neutral""accent"
labelstring"Microphone level"Accessible name. Default "Microphone level".
classNamesLiveWaveformClassNames—Classes for the named visual parts; no overrides by default.
style / refCSSProperties / native Ref—style: Inline styles on the documented visual root; no overrides by default. ref: Receives the documented native target or imperative handle; omitted by default.
barWidthnumber—
gapnumber—
classNamestring—Classes on the documented visual root; no override by default.
styleCSSProperties—Inline styles on the documented visual root; no overrides by default.
refRef<HTMLDivElement>—Receives the documented native target or imperative handle; omitted by default.

Used in

Import

import { LiveWaveform } from "@beamline/live-waveform";

Get it

Live waveform is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Get Beamline · Connect your agent

More in Voice & audio

  • Recorded answer: A spoken answer against a time limit: record (the microphone asked for first, a blocked one said with what to do), the running time against the limit…
  • Orb: The agent's presence: a thin ring of light around a lens in the brand's hue that holds still at rest, sends an arc round while thinking and widens with…
  • Call grid: The people on a video call, laid out for the room they are given: tiles as large as the space allows at the camera's shape, or the person talking (or a…
  • Bar visualizer: A row of bars that says what a voice agent is doing: a sweep while connecting, the person's voice while listening, a slow breath while thinking, the…
  • Matrix: A dot-matrix display: animated frame sets (loading, pulse, wave, syncing), text and digits in a 5×7 font, or a VU meter of levels or a live source. One…
  • Transcript viewer: A recording and its words together: the spoken word lights up as it plays and the transcript follows it, any word or paragraph time plays from there…
  • Waveform: The shape of a recording: one bar per slice of loudness, fitted to any width, with the played part in the accent, unmeasured slices hatched and a loading…
  • Conversation bar: The control bar of a voice call with an agent: one button to call and hang up, the agent's state as bars, a call timer, mute, and typing when talking is…
  • Audio player: One audio element and its controls: play with a loading state, a scrub bar with time, skip, speed and a playlist whose rows play into the same player…
  • Voice button: The control that starts and stops talking: click to toggle or hold to talk (pointer, Space, Enter or a global shortcut), with a live level while…
  • Scrub bar: A seekable timeline for audio or video: elapsed and total time, what has loaded, chapter marks, a time preview under the pointer, and the full keyboard…
  • Speech input: A text field you can speak into: the mic dictates through any speech-to-text provider, the phrase being heard shows apart from the finished words, and…
  • Voice picker: Choose a text-to-speech voice from a searchable list (name, accent, tone, use) and hear it first: each voice has its own orb, previews play one at a time…
  • Microphone selector: Choose the microphone, test it with a live level and mute it, with every permission and device state spelled out: not yet allowed, blocked (and how to…

Part of Beamline UI: polished, editable React components and complete screens for custom applications. Build your own style from any look; tokens, fonts, radii, motion; not only colours.