Booting Environment...

Bar Visualizer

A dynamic audio visualization component for voice agents and media. Supports live media streams or simulated demo states.

Installation

npx raya-ui@latest add bar-visualizer

File Structure

your-project
components
ui
bar-visualizer
BarVisualizer.vue

API Reference

Props

state
AgentState

Current interaction state. Accepts 'speaking', 'listening', 'thinking', 'connecting', 'initializing'.

barCount
number
15

The total number of vertical bars to render in the visualization.

demo
boolean
false

If true, simulates audio visualization using CSS animations without requiring a real audio stream.

mediaStream
MediaStream | null
null

The actual Web Audio API stream to hook into for live visualization.

minHeight
number
20

The minimum height percentage of the bars when at rest.

maxHeight
number
100

The maximum height percentage the bars can reach during peak audio.

Settings
20
20%
100%