Custom Audio Processing

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

TypeParametersWhat it does
eq_bandfrequency, gain_db, q, filter_typeParametric EQ band (bell, shelf, HPF, LPF)
compressorthreshold_db, ratio, attack_ms, release_msDynamic range compression
limiterceiling_dbtp, gain_dbBrickwall limiting with true peak ceiling
gaingain_dbSimple gain adjustment
hpffrequency, qHigh-pass filter
lpffrequency, qLow-pass filter

Example Output

apply_processing

Processing: master_bus.wav Chain: 3 operations [1/3] EQ band: +1.5 dB shelf at 3 kHz (Q=0.7) [2/3] Compressor: -18 dB threshold, 2:1 ratio, 10ms attack, 100ms release [3/3] Limiter: -1.0 dBTP ceiling, +1.8 dB gain Output: master_bus_processed.wav Peak: -1.0 dBTP Duration: 0.8s

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”