parent
c9075de3c4
commit
9a35efddd0
32
README.md
32
README.md
|
@ -14,7 +14,8 @@ The following features are included in the application:
|
||||||
To set up the application, you need Python 3. After cloning the repository change to the project directory and install the dependencies via:
|
To set up the application, you need Python 3. After cloning the repository change to the project directory and install the dependencies via:
|
||||||
|
|
||||||
```
|
```
|
||||||
python3 -m pip install requirements.txt
|
apt-get install gcc nano ffmpeg libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0 postgresql postgresql-contrib -y
|
||||||
|
python3 -m pip install -r requirements.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
@ -73,7 +74,34 @@ pytest --host http://localhost:8600
|
||||||
|
|
||||||
https://github.com/worldveil/dejavu/blob/master/mp3/Brad-Sucks--Total-Breakdown.mp3 -> QmU3XRYZiebdDMcUwKrvecxyDgtgVY6zaNYrzQBeCkFb2r
|
https://github.com/worldveil/dejavu/blob/master/mp3/Brad-Sucks--Total-Breakdown.mp3 -> QmU3XRYZiebdDMcUwKrvecxyDgtgVY6zaNYrzQBeCkFb2r
|
||||||
|
|
||||||
|
```bash
|
||||||
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\",\"song\":\"Brad-Sucks--Total-Breakdown\"}"
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X POST "http://localhost:8600/api/v1/mazash/recognize" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"cid\":\"QmU3XRYZiebdDMcUwKrvecxyDgtgVY6zaNYrzQBeCkFb2r\",\"extension\":\".mp3\"}"
|
||||||
|
```
|
||||||
|
|
||||||
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 :
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"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
|
||||||
|
}```
|
|
@ -24,7 +24,7 @@ services:
|
||||||
python:
|
python:
|
||||||
build:
|
build:
|
||||||
context: ./python
|
context: ./python
|
||||||
entrypoint: bash -c "pip install -r requirements.txt && pip install https://github.com/worldveil/dejavu/zipball/master && /code/run_app_prod.sh"
|
entrypoint: bash -c "pip install -r requirements.txt && /code/run_app_prod.sh"
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_HOST=mazash_db_1.mazash_db_networks
|
- POSTGRES_HOST=mazash_db_1.mazash_db_networks
|
||||||
- POSTGRES_DB=dejavu
|
- POSTGRES_DB=dejavu
|
||||||
|
|
|
@ -14,5 +14,8 @@ marshmallow
|
||||||
flask_swagger_ui
|
flask_swagger_ui
|
||||||
openapi_spec_validator
|
openapi_spec_validator
|
||||||
|
|
||||||
|
#dejavu
|
||||||
|
git+git://github.com/worldveil/dejavu@e56a4a221ad204654a191d217f92aebf3f058b62
|
||||||
|
|
||||||
#ipfs
|
#ipfs
|
||||||
ipfsapi
|
ipfsapi
|
||||||
|
|
Loading…
Reference in New Issue