How to add a speaker measurement?

Published

February 8, 2025

How to add a speaker?

Clone the repository with git.

git clone git@github.com:pierreaubert/spinorama.git

Look at the installation procedure. If you are under Linux:

sh setup.sh

should help.

source env.sh

should return something sensible:

(spinorama-venv) pierre@spin:~/src/spinorama$ source env.sh
Identity added: /home/pierre/.ssh/id_rsa_github (/home/pierre/.ssh/id_rsa_github)
SPIN           /home/pierre/src/spinorama
  Python 3.8.5 /home/pierre/src/spinorama/spinorama-venv/bin/python3
  pip 20.0.2 from /home/pierre/src/spinorama/spinorama-venv/lib/python3.8/site-packages/pip (python 3.8)
  jupyter-lab  3.0.9 /home/pierre/src/spinorama/spinorama-venv/bin/jupyter-lab
  PYTHONPATH   /home/pierre/src/spinorama/src
  github key   /home/pierre/.ssh/id_rsa_github
  GPU          GPU 0: GeForce GTX 1050 Ti (UUID: GPU-3867475b-1d2f-d7c1-490c-53e0df425ff1)
  RAY          ray, version 1.2.0

Add measurements data

  1. if your data are from ASR and generated by the Klippel software:
    • add the unzip files to ./datas/ASR/name of speaker/all text files
  2. if your data are from Princeton/3d3a (i have normally done all of them).
    • add the 2 IR files to ./datas/Princeton/name of speaker/,
  3. if you only have a picture of the spinorama:
    • please use WebPlotDigitizer to generate a parsed json file
    • a complete tutorial is available.
    • add it to datas/vendor if it comes from the manufacturers. Here is an example:
    cd ./datas/measurements
    mkdir -p Revel\ W522L
    mv /tmp/wpd_project.tar Revel\ W522L/Revel\ W522L.tar
  4. if you have a GLL file.
    • you can use another software gll2txt to extract the 72 measurements automatically from the GLL file. It will generate a zip file with all the measurements inside.
    • copy the data to the usual place:
    cd ./datas/measurements
    mkdir -p Revel
    cd Revel
    mkdir -p Revel\ W522L
    mv /tmp/Revel W5222L.zip Revel\ W522L

Add a picture of the speaker in datas/pictures in png or jpeg format.

  • Following on the same example:
mv /tmp/Revel\ W522L.png ./datas/pictures

or

mv /tmp/Revel\ W522L.jpg ./datas/pictures

(Note the .jpg not .jpeg) - Generates various scaled version:sh ./update_pictures.sh'

Generate an entry in ./datas/metadata.py

  • Please keep it sorted
  • Copy / Paste from the template file (speaker.tmpl) and add the relevant informations that you can find.
 "Revel W522L": {
     "brand": "Revel",
     "model": "W522L",
     "type": "passive",
     "shape": "bookshelves",
     "price": "",
     "default_measurement": "vendor",
     "measurements": {
         "vendor": {
             "origin": "Vendors-Revel",
             "website": "www.revel.com",
             "format": "webplotdigitizer",
         },
     },
 },

Add the change to the relevant metadata_x.py file for a revel, first letter is r, so metadata_r.py. - Test your changes with ./test_meta.py: if you see no output, then it is working.

Test it works with:

  • ./generate_graphs --speaker='name of speaker'
  • Ex: for the above speaker I see:
(spinorama-venv) pierre@spin:~/src/spinorama$ ./generate_graphs.py --speaker='Revel W522L' --log-level=INFO
2021-02-24 08:53:53,259 INFO services.py:1172 -- View the Ray dashboard at http://127.0.0.1:8265
Queued 188 speakers 1 measurements
(pid=552950) Saving CEA2034 in dist/Revel W522L/Revel/vendor/CEA2034.json
(pid=552950) Saving CEA2034 in dist/Revel W522L/Revel/vendor/CEA2034_large.png
(pid=552950) Saving On Axis in dist/Revel W522L/Revel/vendor/On Axis.json
(pid=552950) Saving On Axis in dist/Revel W522L/Revel/vendor/On Axis_large.png
(pid=552950) Saving Estimated In-Room Response in dist/Revel W522L/Revel/vendor/Estimated In-Room Response.json
(pid=552950) Saving Estimated In-Room Response in dist/Revel W522L/Revel/vendor/Estimated In-Room Response_large.png
(pid=552950) Saving 2cols in dist/Revel W522L/Revel/vendor/2cols_large.png
2021-02-24 08:53:58,927 - spinorama - INFO - State: 4 ready IDs 0 remainings IDs 4 Total IDs 0 Done
  • visualize results in directory:
    • ./dist/name of speaker/origin/default/CEA2034_large.png or
    • ./dist/name of speaker/origin/default/2cols_large.png
  • if it does not work, run the generate_graph in debug mode: ./generate_graphs --speaker='name of speaker' --log-level=debug. Most of the time, the data is not in the correct place or there is a small bug in the metadata.

Add your files to git and push to github on develop branch

  • git status you should see a long list of files that git doesn’t now about yet.
  • git add all new files usually via git add datas
  • git commit -m 'add data for new speaker name' datas
  • git push you will need to be loggued on github.

If you do not want to use GitHub, then generate a diff and send it to me over email.

  • git diff > diff-speaker.txt
  • mail it to pierre /at\ spinorama \dot/ org.