Lets your AI assistant build and run a processing chain on any audio file. You describe what you want (“cut the low end, add some compression, limit to -1 dBTP”) and the assistant translates that into a list of operations that Phantom executes in sequence.
Requires the phantom-audio[processing] extra. Add it with: uv tool install "phantom-audio[processing]" --python 3.13 --force
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| file_path | string | required | Path to input audio file |
| operations | list[dict] | required | Ordered list of processing operations. Each operation is a dictionary with a "type" key and type-specific parameters. |
| output_path | string | required | Where to write the processed file. Must sit inside Phantom's output directory (~/.phantom/output by default, or PHANTOM_OUTPUT_DIR). Paths outside it are rejected. |
Supported Operations
Each operation is a dict with a type key. The type names are Pedalboard plugin class names and are matched exactly — they are case-sensitive, and anything outside this list is rejected with an error listing the valid types. Every other key in the dict is passed straight through to that plugin’s constructor.
| Type | Parameters (with defaults) | What it does |
|---|---|---|
HighpassFilter | cutoff_frequency_hz 50 | High-pass filter |
LowpassFilter | cutoff_frequency_hz 50 | Low-pass filter |
PeakFilter | cutoff_frequency_hz 440, gain_db 0.0, q 0.707 | Parametric bell band |
HighShelfFilter | cutoff_frequency_hz 440, gain_db 0.0, q 0.707 | High shelf |
LowShelfFilter | cutoff_frequency_hz 440, gain_db 0.0, q 0.707 | Low shelf |
Compressor | threshold_db 0, ratio 1, attack_ms 1.0, release_ms 100 | Dynamic range compression |
Limiter | threshold_db -10.0, release_ms 100.0 | Brickwall limiting |
Gain | gain_db 1.0 | Simple gain adjustment |
NoiseGate | threshold_db -100.0, ratio 10, attack_ms 1.0, release_ms 100.0 | Gate below a threshold |
Note that Limiter sets its ceiling with threshold_db and has no separate makeup gain — put a Gain before it if you need one.
operations
Example Output
The tool returns the path it wrote and a marker that the chain was user-supplied. It does not report per-operation detail or measure the result — run analyze_loudness on the output if you need to confirm where you landed.
apply_processing
When to Use It
This tool is for when you know exactly what processing you want applied and want Phantom to execute it. It pairs well with analysis tools: run analyze_loudness to see where you stand, then use apply_processing to get where you need to be.
The difference between this and fix_audio is intent. fix_audio is corrective (find and remove problems). apply_processing is creative (you decide what goes on).
Pro tip
Operations run in the order you list them. Signal flow matters: put your EQ before compression if you want the compressor to react to the shaped signal, or after if you want to shape the compressed result.
Typical Prompts
- “Apply a high-pass at 80 Hz and gentle compression to the bass stem”
- “Master this mix: shelf boost at 3k, glue compression, limit to -1 dBTP”
- “Cut 3 dB at 250 Hz and boost 2 dB at 8 kHz on the vocal”
- “Run the same EQ and compression chain on all four stems”