You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
joseelinchevalay 83965bd390
Merge branch 'master' of into feature/fingerprint_return
1 month ago
python solve docker issue 1 month ago
src fix #3 2 years ago
test initial commit 2 years ago
.gitignore initial commit 2 years ago Modify README requirements and docker-compose 2 years ago
app.ini initial commit 2 years ago
docker-compose.yaml solve docker issue 1 month ago
requirements.txt solve docker issue 1 month ago initial commit 2 years ago initial commit 2 years ago
swagger_ui.png initial commit 2 years ago initial commit 2 years ago


Swagger UI API documentation Minimal application IPFS & Dejavu

The following features are included in the application:

  • Recognize song by CID ipfs and extension
  • Fingerpint CID IPFS, extension, song name
  • API documentation using the OpenAPI 3 specification and Swagger UI


To set up the application, you need Python 3. After cloning the repository change to the project directory and install the dependencies via:

apt-get install gcc nano ffmpeg libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0 postgresql postgresql-contrib -y
python3 -m pip install -r requirements.txt


To start the app in development mode, execute


The application will then be available at localhost:5000. You can test the functionality manually using curl, e.g. via

curl localhost:5000/api/v1/path_for_blueprint_x/test

or through the automated tests, by running


The commands should output

  "msg": "I'm the test endpoint from blueprint_x."


test/ ....

============= 4 passed in 0.14s ==============


To view the API documentation through the Swagger user interface, navivate your browser to localhost:5000/api/docs.


To run the app in production, execute


Now the application is served on localhost:8600. To run the automated tests for the production host, use

pytest --host http://localhost:8600

mp3 for test -> QmU3XRYZiebdDMcUwKrvecxyDgtgVY6zaNYrzQBeCkFb2r

curl -X POST "http://localhost:8600/api/v1/mazash/recognize" -H  "accept: application/json" -H  "Content-Type: application/json" -d "{\"cid\":\"QmU3XRYZiebdDMcUwKrvecxyDgtgVY6zaNYrzQBeCkFb2r\",\"extension\":\".mp3\",\"song\":\"Brad-Sucks--Total-Breakdown\"}"
curl -X POST "http://localhost:8600/api/v1/mazash/recognize" -H  "accept: application/json" -H  "Content-Type: application/json" -d "{\"cid\":\"QmU3XRYZiebdDMcUwKrvecxyDgtgVY6zaNYrzQBeCkFb2r\",\"extension\":\".mp3\"}"

response :

  "align_time": 0.11919093132019043,
  "fingerprint_time": 4.459228992462158,
  "query_time": 2.729705810546875,
  "results": [
      "file_sha1": "02A83F248EFDA76A46C8B2AC97798D2CE9BC1FBE",
      "fingerprinted_confidence": 1,
      "fingerprinted_hashes_in_db": 75062,
      "hashes_matched_in_input": 75062,
      "input_confidence": 1,
      "input_total_hashes": 75062,
      "offset": 0,
      "offset_seconds": 0,
      "song_id": 1,
      "song_name": "Brad-Sucks--Total-Breakdown"
  "total_time": 7.348343849182129