Phantom
Phantom measures audio and gives an AI assistant evidence to work with. Analyze a mix or a folder of stems, compare it with a reference, and investigate loudness, tonal balance, stereo behavior, phase, and frequency masking.
Use it as a command-line tool, a Python library, or an MCP server. The Claude Code plugin adds five skills for interpreting the measurements and planning a mix. Separate Reaper and Ableton MCP integrations let an assistant work inside your DAW.
Documentation · Getting started · Tool reference · Releases
Start with one file
Phantom supports macOS and Linux with Python 3.11–3.13. The commands below use 3.13. Windows is not supported: the Essentia dependency has no Windows wheel. A replacement backend is tracked in issue #52.
Install uv, then:
uv tool install phantom-audio --python 3.13
phantom analyze mix.wav
phantom analyze mix.wav --json
phantom compare mix.wav --reference reference.wav
phantom doctor
The CLI works without an AI assistant. First use may run setup to configure the MCP server and Claude Code plugin; you can also run phantom setup explicitly.
For an assistant, try: “Analyze these stems. Prioritize technical problems, explain the measurements, and tell me what you would check by listening before changing anything.”
What you can do
- Check a recording before mixing. Look for digital clipping, DC offset, mains hum, noise, and stereo polarity problems. Batch diagnostics also report differing sample rates.
- Compare a mix with a reference. Measure loudness, relative octave-band balance, dynamics, and stereo differences. Nine genre profiles provide starting targets when you do not have a reference file.
- Find competing stems. Rank pairs by weighted octave-band overlap to decide where to investigate masking. The score is a heuristic; it does not establish that one instrument is inaudible.
- Try corrective processing. With the processing extra, apply EQ and other Pedalboard operations or use recipes for selected detected problems.
fix_audio reports before/after findings, including regressions.
- Read meters from Phantom Studio.
read_live_metrics reads local snapshots from the separate Studio preview plugin. Studio is not included in this package.
The measurements support an engineering decision. They cannot decide whether distortion is intentional, whether a reference suits a song, or whether a change sounds better.
Analysis tools
The MCP server exposes 20 tools over stdio:
| Purpose | Tools |
|---|
| Measure a file | analyze_spectrum, analyze_loudness, analyze_dynamics, analyze_stereo, analyze_phase, detect_problems |
| Compare stems | compare_phase, analyze_masking, multi_stem_masking |
| Compare targets | compare_to_profile, compare_to_reference, list_profiles, load_profile |
| Process audio | match_to_reference, separate_stems, fix_audio, apply_processing |
| Diagnose a session | full_diagnostic, batch_diagnostic, read_live_metrics |
Loudness is measured from the individual channels. Clipping checks either channel and accounts for integer PCM's positive rail. For analyses based on a mono signal, Phantom uses the loudest channel if stereo cancellation would otherwise turn active audio into a silent downmix. Phase and stereo measurements still describe the original channels.
Optional processing
Install the capabilities you need into the same isolated environment:
# Corrective EQ, compression, and other Pedalboard effects
uv tool install --force 'phantom-audio[processing]' --python 3.13
# Add reference matching and stem separation as well
uv tool install --force 'phantom-audio[all]' --python 3.13
The matching extra uses Matchering. The separation extra installs the sibling phantom-audio-separation package and Demucs/PyTorch; these are a substantially larger download, and first use downloads model weights. analysis adds librosa for optional cross-validation. None is needed for the core analysis tools.
phantom fix vocal.wav --output vocal-fixed.wav
phantom separate mix.wav --output stems
phantom render mix.wav --reference reference.wav --output matched.wav
phantom render mix.wav --format flac --output converted.flac
Relative output paths resolve inside ~/.phantom/output by default. Set PHANTOM_OUTPUT_DIR to an existing directory to write elsewhere. Format conversion also requires the ffmpeg executable.