Skip to main content

AutoEq

AutoEq is a tool for equalizing headphone frequency responses automatically, and it achieves this by parsing frequency response measurements and producing equalization settings which correct the headphone to a neutral sound. AutoEq provides methods for reading data, equalizing it to a given target response and saving the results for usage with equalizers. It's possible to use different target curves, apply tilt for making the headphones brighter/darker and adding a bass boost. It's even possible to make one headphone sound (roughly) like another headphone. For more info about usage see Usage.

AutoEq Github page also serves as a database for headphone frequency response measurements, pre-computed results and has documentation about different equalizers and how the implementation works.

Updates

4.1.2

  • Fixed Room Eq Wizard CSV export parsing
  • Added Moondrop Free DSP PEQ optimizer config
  • Fixed reading windows-1252 encoded CSV files
  • Fixed graphic eq optimization producing wildly different results from the equalizer target

4.1.1

  • Updated changelog

4.1.0

  • Added gain_range option to optimize_fixed_band_eq() for limiting gain of each filter to maximum distance from the equalization target

4.0.0

BREAKING changes included!

  • Several FrequencyResponse class methods renamed and arguments renamed or dropped
    • Improved duplicate frequency check
    • All kwargs in reset() default to False
    • Renamed read_from_csv() as read_csv() and write_to_csv() as write_csv()
    • Dropped Rockbox support (has been added to webapp)
    • Moved generate_frequencies() to utils.py
    • Moved _tilt() to utils.py as log_tilt()
    • Changed all mentions of "compensation" to "target"
    • Renamed smoothen_fractional_octave() as smoothen()
    • Removed iterations from smoothing
    • Moved _sigmoid() to utils.pyas log_f_sigmoid()
    • Moved log_log_gradient() to utils.py as log_log_gradient()
    • Renamed plot_graph() as plot
    • Changed plot() kwargs show and close to show_fig and close_fig, respectively
    • Changed plot colors to match webapp
    • Added missing default values to process() kwargs
  • Removed some CLI arguments

3.0.1

Updated dependencies.

3.0.0

  • Added --input-file, --max-slope and --sound-signature-smoothing-window-size parameters.
  • Fixed crashing with non-standard sized compensation and measurement data.
  • Fixed parametric eq optimizer producing filters outside of specified frequency range.
  • Fixed parametric eq optimizer crashing without any free optimizeable parameters.
  • Added defaul values for some args in parametric eq optimizer.
  • Added more parametric eq optimizer configs.
  • Introduced API breaking naming changes.

2.2.0

Added --preamp parameter.

2.1.1

Fixed README in PyPi package.

2.1.0

Fixed dependencies for Apple Silicon and added --treble-boost parameter.

2.0.0

Restructured the project and published in PyPi. Source code moved under autoeq directory and command line usage changed from python autoeq.py to python -m autoeq with underscores _ replaced with hyphens - in the parameter names.

Parametric eq optimizer reworked. The new optimizer supports shelf filters, has a powerful configuration system, run 10x faster, has limits for Fc, Q and gain value ranges and treats +10 kHz range as average value instead of trying to fix it precisely.

Installing

AutoEq requires Python 3 and should work with any decently recent version of Python 3.

pip install autoeq

You may need to install libsndfile

On Windows you may need to install Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017, and 2019

Usage

AutoEq has command line interface in addition to Python methods. See python -m autoeq --help for arguments.

The full functionality with file input and output can be used with batch_processing:

from autoeq.batch_processing import batch_processing

batch_processing(
  input_dir='path/to/measurements', output_dir='path/to/results', new_only=False, standardize_input=False,
  compensation='path/to/target.csv', parametric_eq=True, fixed_band_eq=True,
  ten_band_eq=True, parametric_eq_config='8_PEAKING_WITH_SHELVES', fixed_band_eq_config='10_BAND_GRAPHIC_EQ',
  convolution_eq=True, fs=44100, bit_depth=16, phase='minimum', f_res=10, bass_boost_gain=6,
  bass_boost_fc=105, bass_boost_q=0.7, treble_boost_gain=0, treble_boost_fc=10000, treble_boost_q=0.7, tilt=None,
  sound_signature=None, max_gain=12, thread_count=0)

The main functionalities of AutoEq are in frequency_response which implements FrequencyResponse class. Parametric equalizer optimization and frequency response computations are implemented in peq.

from autoeq.frequency_response import FrequencyResponse
from autoeq.constants import PEQ_CONFIGS

harman_target = FrequencyResponse.read_csv('path/to/Harman over-ear 2018.csv')

fr = FrequencyResponse.read_csv('path/to/measurement.csv')
fr.interpolate()  # Creates standard logarithmic sampling when no argument is passed
fr.center()  # Centers the frequency response around 0 dB
fr.compensate(harman_target)  # Creates target and error data for the FR
fr.smoothen()  # Smoothens the FR data and error
fr.equalize(concha_interference=True)  # Creates equalization target
peqs = fr.optimize_parametric_eq(PEQ_CONFIGS['8_PEAKING_WITH_SHELVES'], 44100)
for filt in peqs[0].filters:
    print(f'{filt.gain:.2f} db, {filt.fc:.2f} Hz, {filt.q:.2f} Q')

Metadata

Release files for autoeq 4.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autoeq 4.1.2
File Size Uploaded
autoeq-4.1.2.tar.gz 33.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for autoeq 4.1.2
File Interpreter ABI Platform
autoeq-4.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 72.2 kB

Release files / autoeq-4.1.2.tar.gz

Download URL autoeq-4.1.2.tar.gz
Size 33.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d4022a151749e6fe118ea919a0284f1d6cd0a9c1147c97c9122b2718ddd50e79
BLAKE2b-256 checksum
How to use checksums
43678d6d000d3970def775d772324cc7f980f16f0cbcf6b13a00de1e6452cd54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / autoeq-4.1.2-py3-none-any.whl

Download URL autoeq-4.1.2-py3-none-any.whl
Size 38.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
771f98b0c8cd06395fc87461727c757e9d6e4c25905538d62d78e7b9efa86c25
BLAKE2b-256 checksum
How to use checksums
e3dfa4d8734c97f017d133891dce25b094e1613c60dc50adf51e866d027a9e68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release history Release notifications | RSS feed

This release

4.1.2 This release

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.0

2 release files

3.0.0

2 release files

2.2.0

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page