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. Install with: pip install phantom-audio[processing]
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 output file. |
Supported Operations
| Type | Parameters | What it does |
|---|---|---|
eq_band | frequency, gain_db, q, filter_type | Parametric EQ band (bell, shelf, HPF, LPF) |
compressor | threshold_db, ratio, attack_ms, release_ms | Dynamic range compression |
limiter | ceiling_dbtp, gain_db | Brickwall limiting with true peak ceiling |
gain | gain_db | Simple gain adjustment |
hpf | frequency, q | High-pass filter |
lpf | frequency, q | Low-pass filter |
Example Output
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”