EQ Settings for 700+ Headphones
Jul 4, 2021 at 12:27 AM Post #121 of 165
Has anyone been able to get autoeq setup to make EQ graphs on an M1 (Arm64) Mac? Python3.8 is installed with XCode 12.5.1 so I was able to complete steps up to updating pip, but trying to install the required python3 modules fails, the only module to install was Pillow. Since that failed with the Python3.8 provided with XCode, I also installed Python3.8 via MacPorts and was able to manually install all python modules (higher rev level than listed in requirements.txt file) except for tensorflow module. MacPorts failed to build a dependency required by tensorflow module, and gracefully stopped the installation of the tensorflow module. I could not get past that point.

I had autoeq setup and running on an Intel-Mac, but that Mac motherboard gave up the ghost. I'm hoping someone can give some guidance to get autoeq running on an M1 Mac.

Work steps I followed are here: https://github.com/jaakkopasanen/AutoEq#equalizing
 
Jul 8, 2021 at 3:08 PM Post #122 of 165
I finally succeeded in setting up the AutoEQ python environment on an M1 Mac.

As mention in my previous post, installation of XCode also installs python 3.8.2, so that is what I used.

I left a comment at this AutoEQ issues page.

This is the fix, all required python modules in 'requirements.txt' install correctly:

arch -x86_64 bash
cd ~/AutoEq
python3 -m venv venv
. venv/bin/activate
python -m pip install -U pip
python -m pip install -U -r requirements.txt
python autoeq.py --help


After AutoEq is setup an easy way to switch to x86_64 mode and activate venv is with a bash script.
Easy to copy and paste the code below into a text editor and save it as (example) "activate_autoeq.sh".

#!/bin/bash
cd ~/AutoEq
. venv/bin/activate
arch -x86_64 bash

In terminal, navigate to where you saved the file and type: chmod +x activate_autoeq.sh to make it executable.
You can run it with: ./activate_autoeq.sh

I hope this will be helpful for others.
 
Last edited:
Jul 9, 2021 at 9:29 AM Post #123 of 165
Although I was able to setup AutoEq with the commands in my previous post there is trouble when trying to create an EQ graph which will probably be beyond what I can find a fix for.

I tried to create a custom EQ graph for Sony WF-1000XM4... here is the result:

(venv) python autoeq.py --input_dir="my_data/Custom Sony WF-1000XM4" --output_dir="my_results/Custom Sony WF-1000XM4" --compensation="compensation/harman_in-ear_2019v2_wo_bass.csv" --equalize --parametric_eq --max_filters=5+5 --ten_band_eq --convolution_eq --bass_boost=6 --standardize_input
Illegal instruction: 4
(venv)

It returns with failure message "Illegal instruction: 4".

Not sure how to proceed from here.

Side note: I did setup AutoEq on a Win10 laptop and ran the same pass for EQ graph for WF-1000XM4 and got good results, no failure.
 
Last edited:
Jul 9, 2021 at 10:33 AM Post #124 of 165
It appears the problem child is tensorflow.

(venv) python
Python 3.8.2 (default, Jun 8 2021, 11:59:35)
[Clang 12.0.5 (clang-1205.0.22.11)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
Illegal instruction: 4
(venv)

Maybe google search will help find a work around...
 
Jul 12, 2021 at 12:03 AM Post #125 of 165
Here's the fully working solution to getting AutoEq working on an Arm64 (Apple Silicon) M1 Mac. I tested this 3 times to be sure there were no mistakes.
I left an updated comment at this AutoEQ issues page.

1. Install Xcode from app store, Xcode Command Line Tools should install,
if not, open terminal and install with: $ xcode-select --install

2. Check for latest version of Miniforge3 at https://github.com/conda-forge/miniforge#download
Download the file for arm64 (Apple Silicon).

3. Launch terminal and navigate to directory where you saved "Miniforge3-MacOSX-arm64.sh" file.
Example: If you saved to your User Downloads directory

$ cd ~/Downloads

4. Install Miniforge3:

$ bash Miniforge3-MacOSX-arm64.sh

You must accept the licensing agreement to continue the installation.

5. After complete installation, you are prompted to initialize Miniforge3.

Do you wish the installer to initialize Miniforge3
by running conda init? [yes|no]
[no] >>> yes

6. Python 3.9 is default for Miniforge installation. AutoEq requires python 3.8.
Next create a virtual environment and install python 3.8.

(base) MAC_Name:~ Username$ conda create --name autoeq_venv python=3.8 pillow matplotlib pandas scipy tabulate libsndfile absl-py google-auth google-pasta astunparse flatbuffers gast grpcio h5py keras-preprocessing markdown oauthlib opt-einsum protobuf requests requests-oauthlib tensorboard

Activating virtual environment.

(base) MAC_Name:~ Username$ conda activate autoeq_venv

Terminal prompt changes to:

(autoeq_venv) MAC_Name:~ Username$

TIP: To deactivate a conda virtual environment use:

$ conda deactivate

NOTE: In the normal AutoEq setup instructions you would create and activate a venv directory within the AutoEq directory.
With Miniforge3 you will be creating and activating a venv directory within ~/miniforge3/envs directory.

7. Installing dependencies outside of conda-forge

$ conda install -c bricew soundfile
$ pip install tensorboard-data-server
$ conda install -c isuruf/label/tf tensorflow-addons

Apple has an alpha version of tensorflow and tensorflow-addons at GitHub which works for arm64 (Apple Silicon).
At the time of putting these instructions together the current alpha release is v0.1alpha3.
Check for a later version at https://github.com/apple/tensorflow_macos/releases before proceeding.
Click the small triangle next to the word 'Assets' of the latest release to see the file links.

Copy the url of both arm64 assets. Example below.

https://github.com/apple/tensorflow...s_macos-0.1a3-cp38-cp38-macosx_11_0_arm64.whl
https://github.com/apple/tensorflow...w_macos-0.1a3-cp38-cp38-macosx_11_0_arm64.whl

Paste the urls into this command:

pip install --upgrade --force --no-dependencies <url> <url>

Below is the command after inserting the urls, which at the time of writing can be copied and pasted into terminal to install the latest alpha release.

$ pip install --upgrade --force --no-dependencies https://github.com/apple/tensorflow...s_macos-0.1a3-cp38-cp38-macosx_11_0_arm64.whl https://github.com/apple/tensorflow...w_macos-0.1a3-cp38-cp38-macosx_11_0_arm64.whl

8. Verifying AutoEq.

$ cd ~/AutoEq
$ python autoeq.py --help <<-- This is only a minimal verification!! AutoEq help may be displayed even if setup is a little wonky.

It's better to run a full EQ graph pass.

Here's an example for true verification from https://github.com/jaakkopasanen/AutoEq#equalizing-individual-headphones :

Equalizing Sennheiser HD 650 and saving results to my_results/HD650:

$ python autoeq.py --input_dir="measurements/innerfidelity/data/onear/Sennheiser HD 650" --output_dir="my_results/HD650" --compensation="measurements/innerfidelity/resources/innerfidelity_harman_over-ear_2018_wo_bass.csv" --equalize --bass_boost=4 --show_plot --convolution_eq --fs=44100,48000

9. Keeping conda updated.

$ conda update conda --all
 
Last edited:
Aug 25, 2021 at 12:04 AM Post #126 of 165
TensorFlow v2.5 (non-alpha, yay!) for Arm64 (Apple Silicon) M1 Macs is available.

Updated the instructions... Enjoy!


1. Install Xcode from app store, Xcode Command Line Tools should install,

if not, open terminal and install with: $ xcode-select --install


2. Check for latest version of Miniforge3 at https://github.com/conda-forge/miniforge#download

Download the file for arm64 (Apple Silicon).


3. Launch terminal and navigate to directory where you saved "Miniforge3-MacOSX-arm64.sh" file.

Example: If you saved to your User Downloads directory


$ cd ~/Downloads


4. Install Miniforge3:

$ bash Miniforge3-MacOSX-arm64.sh

You must accept the licensing agreement to continue the installation.


5. After complete installation, you are prompted to initialize Miniforge3.

Do you wish the installer to initialize Miniforge3
by running conda init? [yes|no]
[no] >>> yes


6. Python 3.9 is default for Miniforge installation. AutoEq requires python 3.8.

Next create a virtual environment and install python 3.8.

(base) MAC_Name:~ Username$ conda create --name autoeq_venv python=3.8 pillow matplotlib pandas scipy tabulate libsndfile

Activating virtual environment.

(base) MAC_Name:~ Username$ conda activate autoeq_venv

Terminal prompt changes to:

(autoeq_venv) MAC_Name:~ Username$

TIP: To deactivate a conda virtual environment use:

$ conda deactivate

NOTE: In the normal AutoEq setup instructions you would create and activate a venv directory within the AutoEq directory.
With Miniforge3 you will be creating and activating a venv directory within ~/miniforge3/envs directory.


7. Installing dependencies outside of conda-forge

$ conda install -c bricew soundfile


8. Installing TensorFlow v2.5

$ conda install -c apple tensorflow-deps

$ python -m pip install tensorflow-macos

8a. Optional installation of tensorflow-metal PluggableDevice to accelerate training with Metal on Mac GPUs.

$ python -m pip install tensorflow-metal

NOTE: I tried running AutoEq EQ passes with tensorflow-metal installed and with it not installed.
I could not tell for sure, but it seemed that EQ passes with tensorflow-metal installed were marginally faster.
Just know that AutoEq will work either way.


9. Verifying AutoEq.

$ cd ~/AutoEq

$ python autoeq.py --help <<-- This is only a minimal verification!! AutoEq help may be displayed even if setup is a little wonky.

It's better to run a full EQ graph pass.

Here's an example for true verification from https://github.com/jaakkopasanen/AutoEq#equalizing-individual-headphones :

Equalizing Sennheiser HD 650 and saving results to my_results/HD650:

$ python autoeq.py --input_dir="measurements/innerfidelity/data/onear/Sennheiser HD 650" --output_dir="my_results/HD650" --compensation="measurements/innerfidelity/resources/innerfidelity_harman_over-ear_2018_wo_bass.csv" --equalize --bass_boost=4 --show_plot --convolution_eq --fs=44100,48000


10. Keeping conda updated.

$ conda update conda --all
 

Attachments

  • AutoEq setup on an Arm64 (Apple Silicon) M1 Mac v2.txt
    3 KB · Views: 0
Sep 26, 2021 at 12:50 PM Post #128 of 165
I have a question about using the impulse response file AutoEQ creates…

If you have multiple sample rate files (shuffling library for example), what the best practice for the sample rate of the impulse filter? Highest SR, lowest SR? Don't worry about it?
How about the accuracy of the impulse files in the first place? For the most part I'm using Daphile as my music server and it can only use BruteFIR. I have no idea if the resulting sound is as good as using an EQ with the same settings
 
Sep 26, 2021 at 1:07 PM Post #129 of 165
No idea on your setup but on Roon you can put multiple SR .irs files into a zip and Roon will choose the best match. With autoeq files that typically means 44.1 and 48 kHz... You can also use autoeq.py command line to generate other sample rate response files.

eg:

--convolution_eq --> Will produce impulse response for convolution equalizers if this parameter exists, no value needed.

--fs FS. --> Sampling frequency in Hertz for impulse response and parametric eq filters. Single value or multiple values separated by commas eg 44100,48000. When multiple values are given only the first one will be used for parametric eq. Defaults to 44100.

--bit_depth BIT_DEPTH. --> Number of bits for every sample in impulse response. Defaults to 16.
 
Last edited:
Feb 11, 2022 at 3:11 PM Post #130 of 165
Thanks for a great job!

Quick question. I was checking KZ DQ6 results, and there's 3 under crinacle. "KZ DQ6", "KZ DQ6 (Sample 1)" and "KZ DQ6 (Sample 2)". I'm only seeing two samples on crinacle? (I might be wrong). How does applications like Wavelet pick what to use? because it will only show me a single entry when searching for DQ6?
 
Feb 12, 2022 at 3:12 AM Post #131 of 165
Thanks for a great job!

Quick question. I was checking KZ DQ6 results, and there's 3 under crinacle. "KZ DQ6", "KZ DQ6 (Sample 1)" and "KZ DQ6 (Sample 2)". I'm only seeing two samples on crinacle? (I might be wrong). How does applications like Wavelet pick what to use? because it will only show me a single entry when searching for DQ6?
The different samples are averaged and the averaged results are used.
 
Feb 12, 2022 at 9:18 AM Post #132 of 165
The different samples are averaged and the averaged results are used.
Oh, so "KZ DQ6" is basically Sample 1 and Sample 2 averaged? All 3 sound quite different. I'm new to Audio, so I'm not sure, but what's the purpose of create average, does it make sense to use the averaged result? the averaged results will be closer to the "true" harman curve?
 
Feb 12, 2022 at 10:08 AM Post #133 of 165
Oh, so "KZ DQ6" is basically Sample 1 and Sample 2 averaged? All 3 sound quite different. I'm new to Audio, so I'm not sure, but what's the purpose of create average, does it make sense to use the averaged result? the averaged results will be closer to the "true" harman curve?
Two units of the same headphone model don't sound the same. That's why sometimes people measure multiple units (samples). The averaged result is the best estimate of what your unit might be.
 
Feb 12, 2022 at 10:22 AM Post #134 of 165
Two units of the same headphone model don't sound the same. That's why sometimes people measure multiple units (samples). The averaged result is the best estimate of what your unit might be.
Unless your sample is the actual Sample 1 or Sample 2 I guess. I tried to listen to all three, and actually think Sample 2 sound the best, but as I mentioned - I'm a new in Audio, and I probably can't identify Harman.

In that case, I think for me personally, it's better to set the PEQ for all the samples and the average in Neutron, and try those (Wavelet only expose the averaged results IIRC).
Think I'll write a quick-n-dirty Python script to convert the PEQ results into Neutron supported PEQ list.

Thank you!
 
Feb 12, 2022 at 10:27 AM Post #135 of 165
Unless your sample is the actual Sample 1 or Sample 2 I guess. I tried to listen to all three, and actually think Sample 2 sound the best, but as I mentioned - I'm a new in Audio, and I probably can't identify Harman.

In that case, I think for me personally, it's better to set the PEQ for all the samples and the average in Neutron, and try those (Wavelet only expose the averaged results IIRC).
Think I'll write a quick-n-dirty Python script to convert the PEQ results into Neutron supported PEQ list.

Thank you!
You can't really average parametric equalizer filters if they have different center frequencies and qualities. You can download the sample 2 GraphicEq.txt file on your phone and import it to Wavelet.
 

Users who are viewing this thread

Back
Top