Real‑time, flashy, terminal audio visualization powered by system audio capture (PulseAudio/PipeWire on Linux, WASAPI loopback on Windows, sounddevice input/loopback on macOS) and a bunch of lovingly over‑tuned DSP & effects.
Check out the releases
section for binaries for the latest version: https://github.com/SimonBaars/cli-audio-visualizer/releases
Key | Action |
---|---|
SPACE | Next visualization mode |
ENTER | Next color scheme |
W | Cycle Adaptive EQ: off → medium (EQ~ default) → strong (EQ+) |
B | Toggle ASCII/simple glyphs |
S | Save config |
Q / ESC | Quit |
git clone https://github.com/yourusername/cli-audio-visualizer.git
cd cli-audio-visualizer
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
You can bundle a standalone binary (no Python needed) per platform:
python -m pip install -r packaging/pyinstaller-requirements.txt
bash packaging/build.pyinstaller.sh
Output goes to dist/cli-audio-visualizer-<platform>-<arch>
.
Notes:
- Linux: relies on PulseAudio/PipeWire libs present on host (parec must be available in PATH).
- Windows: WASAPI loopback works only when
sounddevice
detects an output device supporting it. - macOS: For true system output capture, user still needs a loopback device (e.g. BlackHole); binary will fall back to microphone otherwise.
- If terminal colors look off in the binary, ensure locale = UTF-8 and a color-capable terminal.
Reproducible build tip: use python -m venv build-env && source build-env/bin/activate
before installing PyInstaller to isolate toolchain.
source .venv/bin/activate
python visualizer.py
- Linux with PulseAudio or PipeWire (for monitor capture via
parec
) - Python 3.9+ (tested newer)
- Terminal with UTF‑8 + color; ASCII mode available otherwise.
Dependencies: numpy
, rich
(for tooling), colorama
, sounddevice
(optional / future), standard curses
.
Platform backends:
- Linux:
parec
(PulseAudio / PipeWire monitor) – auto-detects a monitor source. - Windows: WASAPI loopback via
sounddevice
(captures system output if available). - macOS:
sounddevice
input – tries to locate a virtual loopback device (BlackHole/Loopback). If none found, falls back to default input (microphone).
Linux – inspect monitor sources manually:
pactl list sources short | grep monitor
If nothing appears, enable monitor profiles in your sound settings or PipeWire config.
Windows – ensure an output device supports loopback (most do). No extra setup typically required.
macOS – to capture system output directly, install a virtual device like BlackHole and set it as an output (or aggregate). Otherwise you'll just see mic input.
audio_visualizer/dsp/bars.py
– core band computation (windowed rFFT, log bins, compensation, adaptive spatial smoothing).- Visualizers under
audio_visualizer/visualizers/
each implement adraw_*
function. - Adaptive EQ = slow running mean with blend strength (0 / 0.4 / 0.65).
- Radial & circular modes add procedural particles (time‑based + energy modulated).
Issue | Tip |
---|---|
No movement | Check system audio playing + correct monitor source exists |
Too jittery | Enable medium adaptive EQ (press W) or ASCII mode for lighter rendering |
Colors wrong | Try another terminal or disable themes forcing palette |
High CPU | Reduce terminal size or switch to a simpler mode (bars / waveform) |
Apache 2.0 – see LICENSE
.
Have fun melting your terminal. PRs / ideas welcome. Tuning the visualizations was a pain in the ass, if you can do a better job, please submit a PR!
# Clone the repository
git clone https://github.com/yourusername/cli-audio-visualizer.git
cd cli-audio-visualizer
# Create virtual environment and install dependencies
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- Python 3.7+
- PulseAudio or PipeWire (Linux)
- parec (PulseAudio recorder - usually pre-installed)
Dependencies:
- numpy
- curses (built-in on Linux/macOS)
source venv/bin/activate
python visualizer.py
Controls:
- SPACE - Cycle through visualization modes
- ENTER - Cycle through color schemes
- Q or ESC - Quit
Below: representative screenshots of each visualization mode.
-
BARS – Classic frequency bars with full spectrum
-
SPECTRUM – Thin spaced analyzer columns
-
WAVEFORM – Time‑domain oscilloscope curve
-
MIRROR_CIRCULAR – Vertical bars mirrored from center axis
-
CIRCULAR_WAVE – Circular energy ring with embellishments (halo / sparks / rays)
-
LEVELS – VU style multi‑band level meters
-
RADIAL_BURST – Music‑reactive starfield burst
- MULTICOLOR (default) - Green→Yellow→Red (classic audio levels)
- BLUE - Blue→Cyan→White
- GREEN - Green→Yellow
- RED - Yellow→Red
- RAINBOW - Full spectrum colors
- FIRE - Red→Yellow→White
The visualizer automatically detects PulseAudio/PipeWire monitor sources. If it doesn't capture system audio:
# Check available sources
pactl list sources short | grep monitor
# The visualizer will use: alsa_output.pci-0000_XX_XX.X.analog-stereo.monitor
If needed, you can set the default source:
pactl set-default-source alsa_output.pci-0000_XX_XX.X.analog-stereo.monitor
No audio detected:
- Ensure audio is playing on your system
- Check that PulseAudio/PipeWire is running
- The visualizer will show which source it's using at startup
Colors not showing:
- Make sure your terminal supports colors
- Try a different terminal emulator (kitty, alacritty, gnome-terminal)
Low visualization levels:
- Turn up your system volume (parec captures at output level)
- Try bass-heavy music for better visualization
- Audio Capture: Uses
parec
to directly capture from PulseAudio/PipeWire monitor sources - FFT: 4096-point FFT for high frequency resolution
- Frequency Range: 20 Hz - 20 kHz with logarithmic binning
- Rendering: Curses with selective updates for smooth, flicker-free display
- Frame Rate: 60 FPS
Apache License 2.0 - See LICENSE file for details.