VoiceWave

A mic that opens into a live voice meter. Tap to listen, tap to stop. Feed it a real level or let it play the part. AI.

Open playground

About

VoiceWave is a React component in the AI category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { VoiceWave } from "@ashutoshswamy/smoui" and set listening, defaultListening, onChange among its 5 props.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { VoiceWave } from "@ashutoshswamy/smoui";

<VoiceWave listening={on} onChange={setOn} level={micLevel} />

Props 5

listening

Controlled state.

boolean
defaultListening

Starting state when uncontrolled.

boolean
onChange

Called on every toggle.

(listening: boolean) => void
level

0-1 live input level. Without it the bars simulate a voice.

number
bars

Bar count. Default 7.

number