{"id":29791009,"url":"https://github.com/metabrainz/acousticbrainz-server","last_synced_at":"2025-07-28T00:13:34.277Z","repository":{"id":21573849,"uuid":"24893738","full_name":"metabrainz/acousticbrainz-server","owner":"metabrainz","description":"The server components for the AcousticBrainz project","archived":false,"fork":false,"pushed_at":"2023-01-19T13:22:36.000Z","size":4625,"stargazers_count":135,"open_issues_count":16,"forks_count":64,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-04-13T23:54:35.367Z","etag":null,"topics":["acousticbrainz-server","big-data","machine-learning","music","python","web"],"latest_commit_sha":null,"homepage":"https://acousticbrainz.org/","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metabrainz.png","metadata":{"funding":{"custom":["https://metabrainz.org/donate"],"github":["metabrainz"]},"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-07T14:22:44.000Z","updated_at":"2024-02-21T14:16:11.000Z","dependencies_parsed_at":"2023-02-11T01:05:13.697Z","dependency_job_id":null,"html_url":"https://github.com/metabrainz/acousticbrainz-server","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/metabrainz/acousticbrainz-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabrainz%2Facousticbrainz-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabrainz%2Facousticbrainz-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabrainz%2Facousticbrainz-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabrainz%2Facousticbrainz-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metabrainz","download_url":"https://codeload.github.com/metabrainz/acousticbrainz-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabrainz%2Facousticbrainz-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267442928,"owners_count":24087899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acousticbrainz-server","big-data","machine-learning","music","python","web"],"created_at":"2025-07-28T00:13:33.692Z","updated_at":"2025-07-28T00:13:34.263Z","avatar_url":"https://github.com/metabrainz.png","language":"Python","funding_links":["https://metabrainz.org/donate","https://github.com/sponsors/metabrainz"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://acousticbrainz.org\"\u003e\u003cimg src=\"https://github.com/metabrainz/metabrainz-logos/blob/master/logos/AcousticBrainz/SVG/AcousticBrainz_logo.svg\" alt=\"AcousticBrainz\"\u003e\u003c/a\u003e\n\u003c/h1\u003e\n\u003ch4 align=\"center\"\u003eServer Components for the AcousticBrainz project\u003c/h4\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/metabrainz/acousticbrainz-server/commits/master\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/last-commit/metabrainz/acousticbrainz-server.svg?style=flat-square\u0026logo=github\u0026logoColor=white\"\n         alt=\"GitHub last commit\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/metabrainz/acousticbrainz-server.org/pulls\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/issues-pr-raw/metabrainz/acousticbrainz-server?style=flat-square\u0026logo=github\u0026logoColor=white\"\n         alt=\"GitHub pull requests\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://acousticbrainz.org\"\u003eWebsite\u003c/a\u003e •\n  \u003ca href=\"https://acousticbrainz.readthedocs.io\"\u003eDocumentation\u003c/a\u003e •\n  \u003ca href=\"https://tickets.metabrainz.org/projects/AB/issues\"\u003eBug tracker\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## About\n\nThe AcousticBrainz project aims to crowd source acoustic information for all music in the world and to make it available to the public. This acoustic information describes the acoustic characteristics of music and includes low-level spectral information and information for genres, moods, keys, scales and much more. The goal of AcousticBrainz is to provide music technology researchers and open source hackers with a massive database of information about music. \n\nAcousticBrainz is a joint effort between [Music Technology Group](https://www.upf.edu/web/mtg/) at [Universitat Pompeu Fabra](http://www.upf.edu) in Barcelona and the [MusicBrainz](http://musicbrainz.org) project.\n\nAcousticBrainz organizes the data on a recording basis, indexed by the [MusicBrainz ID](https://musicbrainz.org/doc/MusicBrainz_Identifier) for [recordings](https://musicbrainz.org/doc/Recording). If you know the MBID for a recording, you can easily fetch from AcousticBrainz. For details on how to do this, visit our [API documentation](https://acousticbrainz.org/data).\n\nChanges and other important announcements about the AcousticBrainz project will be\nannounced on [our blog](https://blog.metabrainz.org/).\n\n## Contributing\n\nIf you are interested in helping out, consider\n[donating](https://metabrainz.org/donate) to the MetaBrainz Foundation.\n\nIf you are interested in contributing code or documentation,\nplease have a look at the [issue tracker](https://tickets.metabrainz.org/browse/AB)\nor come visit us in the #metabrainz IRC channel on irc.libera.chat.\n\n## Installation and Running\n\n### Docker\n\nWe use [docker](https://www.docker.com/) and [docker-compose](https://docs.docker.com/compose/) to run the AcousticBrainz server.\nEnsure that you have these tools installed, [following the installation instructions](https://docs.docker.com/engine/install/).\n\n### Configuration\n\nCopy the following two configuration files:\n\n1. `config.py.example` to `config.py`\n2. `profile.conf.in.sample` to `profile.conf.in` in the `./hl_extractor/` directory\n  In `profile.conf.in` you need to set the `models_essentia_git_sha` value.\n  Unless you know what you are doing, this value should be **v2.1_beta1**\n\n#### Running `docker-compose` commands\n\nFor convenience, we provide a script `develop.sh` which calls `docker-compose`. We also have some additional\nsubcommands for commonly used commands. Some of these subcommands take no arguments:\n\n    ./develop.sh bash   # open a bash shell in a new container in the webserver service\n    ./develop.sh psql   # run psql, connecting to the database\n    ./develop.sh shell  # run a flask shell in ipython\n\nAnd some subcommands take arguments, passing them to the underlying program:\n\n    ./develop.sh npm    # run npm in a new container in the webserver service\n    ./develop.sh manage # run python manage.py in a new container in the webserver service\n    ./develop.sh ...    # run docker-compose\n\nIf you want to run `docker-compose` yourself you are welcome to do so, however keep in\nmind that we call it in the following way, to standardise the project name:\n\n    docker-compose -f docker/docker-compose.dev.yml -p acousticbrainz-server \u003cargs\u003e\n\n### Build and initial configuration\n\nBuild the docker containers needed for AcousticBrainz by running the following:\n\n    ./develop.sh build\n\n### Running \n\nStart the webserver and other required services with:\n\n    ./develop.sh up\n\nThe first time you install AcousticBrainz, you will need to initialize the AcousticBrainz database.\nRun in a separate terminal:\n\n    ./develop.sh manage init_db\n    \nYou will be able to view your local AcousticBrainz server at http://localhost:8080\n\n## Development notes\n\n### Database\n\nIn order to load a psql session, use the following command:\n\n    ./develop.sh psql\n\n### Building static files\n\nWe use webpack as our JavaScript/CSS build system.\n\n#### First-time npm setup\nFor development, the first time that you install acousticbrainz you must install\nnode packages in your local directory.\n\n    ./develop.sh npm install\n\nThis has the effect of creating a `node_modules` directory in your local code checkout.\n\nTo build stylesheets and javascript bundles, run webpack:\n\n    ./develop.sh npm run build:dev\n\nYou will need to rebuild static files after you modify JavaScript or CSS. If you want to rebuild\nthese source files as you change them then you can run webpack in watch mode:\n\n    ./develop.sh npm run build:watch\n\n### Login\n\nTo use the dataset tools you need to configure OAuth with MusicBrainz.\nLog in to your MusicBrainz account (or create one if needed) and create\n[a new application](https://musicbrainz.org/account/applications).\n\nChoose a name (for example, \"AcousticBrainz development\"), set Type to \"Web Application\"\nand set the Callback URL to http://localhost:8080/login/musicbrainz/post\n\nCopy the OAuth Client ID and OAuth Client Secret values to\n`config.py` as `MUSICBRAINZ_CLIENT_ID` and `MUSICBRAINZ_CLIENT_SECRET`.\n\nYou should now be able to use the menu in the top corner of your AcousticBrainz server\nto log in.\n\n### Admin interface\n\nOnce you have logged in, you can make your user an admin, by running\n\n    ./develop.sh manage add_admin \u003cyour user\u003e\n\nYou should now be able to access the admin section at http://localhost:8080/admin\n\n\n## Working with data\n\n### Importing\n\n\u003e Before you import or export data, make sure you understand how\n[docker bind mounts](https://docs.docker.com/engine/admin/volumes/bind-mounts/) work.\nThe following commands will work if you specify paths in the current directory, but\nif you want to specify paths somewhere else (e.g. a Downloads or tmp directory) you\nmust specify an additional `--mount` flag.\n\nAcousticBrainz provides data dumps that you can import into your own server.\nLatest database dump is available at http://acousticbrainz.org/download. You\nneed to download full database dump from this page and use it during database\ninitialization:\n\n    ./develop.sh run --rm webserver python2 manage.py init_db path_to_the_archive\n\nyou can also easily remove existing database before initialization using\n`--force` option:\n\n    ./develop.sh run --rm webserver python2 manage.py init_db --force path_to_the_archive\n\nor import archive after database is created:\n\n    ./develop.sh run --rm webserver python2 manage.py import_data path_to_the_archive\n\n*You can also import dumps that you created yourself. This process is described\nbelow (see `dump full_db` command).*\n\n### Exporting\n\nThere are several ways to export data out of AcousticBrainz server. You can\ncreate full database dump or export only low-level and high-level data in JSON\nformat. Both ways support incremental dumping.\n\n#### Examples\n\n**Full database dump:**\n\n    ./develop.sh manage dump full_db\n\n**JSON dump:**\n\n    ./develop.sh manage dump json\n\n*Creates two separate full JSON dumps with low-level and high-level data.*\n\n**Incremental dumps:**\n\n    ./develop.sh manage dump incremental\n\n*Creates new incremental dump in three different formats: usual database dump,\nlow-level and high-level JSON.*\n\n**Previous incremental dumps:**\n\n    ./develop.sh manage dump incremental --id 42\n\n*Same as another one, but recreates previously created incremental dump.*\n\n## Test your changes with unit tests\n\nUnit tests are an important part of AcousticBrainz. It helps make it easier for\ndevelopers to test changes and help prevent easily avoidable mistakes later on.\nBefore commiting new code or making a pull request, run the unit tests on your code.\n\n    ./test.sh\n\nThis will start a set of docker containers separate from your development environment,\nrun the tests, and then stop and remove the containers. To run tests more rapidly\nwithout having to bring up and take down containers all the time, you can run\neach step individually. To bring up containers in the background:\n\n    ./test.sh -u\n\nThen run your tests when you need with:\n\n    ./test.sh [optional arguments to pass to py.test]\n\nStop the test containers with:\n\n    ./test.sh -s\n\nThis will stop but not delete the containers. You can delete the containers with:\n\n    ./test.sh -d\n\nWe use the `-p` flag to `docker-compose` to start the test containers as a new\nproject, `acousticbrainztest` so that containers don't conflict with\nalready running development containers. You can access containers directly\nwhile they are running (e.g. with `docker exec`) with this name (e.g. `acousticbrainztest_db_1`)\n\nThe database has no separate volume for data, this means that any data\nin the test database will disappear when the containers are\ndeleted (at the end of standalone `./test.sh`, or after `./test.sh -d`)\n\nWe forward the port from postgres to `localhost:15431`, so you can connect to it\nwith `psql` on your host if you want to inspect the contents of the database.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetabrainz%2Facousticbrainz-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetabrainz%2Facousticbrainz-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetabrainz%2Facousticbrainz-server/lists"}