Browse files

update examples for 4.12

  • Loading branch information...
1 parent f82d57e commit b1605d5650be0552fd2de5bd714b8d84fd41a9e7 Andrew Nesbit committed Mar 13, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2
@@ -53,12 +53,14 @@ The makefile builds an example code generator that uses libcodegen, called "code
Will take 30 seconds of audio from 10 seconds into the file and output JSON suitable for querying:
- {"metadata":{"artist":"Michael jackson", "release":"800 chansons des annes 80", "title":"Billie jean", "genre":"", "bitrate":192, "sample_rate":44100, "seconds":294, "filename":"billie_jean.mp3", "samples_decoded":220598, "given_duration":30, "start_offset":10, "version":4.00}, "code_count":846, "code":"JxVlIuNwzAMQ1fxCDL133+xo1rnGqNAEcWy/ERa2aKeZmW...
+ [
+ {"metadata":{"artist":"Michael Jackson", "release":"Thriller", "title":"Billie Jean", "genre":"", "bitrate":128,"sample_rate":44100, "duration":294, "filename":"billie_jean.mp3", "samples_decoded":330902, "given_duration":30, "start_offset":10, "version":4.12, "codegen_time":0.087329, "decode_time":0.297166}, "code_count":906, "code":"eJztmm2OZacORafEt2E4YGD-Q8jCt1UnXdKlIlVa ..."
+ ]
You can POST this JSON directly to the Echo Nest's [song/identify]( "song/identify") (who has an Echoprint server booted), for example:
curl -F "query=@post_string"
- {"fp_lookup_time_ms": 21, "results": [{"songID": "SOAFVGQ1280ED4E371", "match_type": "fp", "title": "Billie Jean", "artist": "Michael Jackson", "artistID": "ARXPPEY1187FB51DF4", "score": 63, "release": "Thriller"}]
+ {"response": {"status": {"version": "4.2", "code": 0, "message": "Success"}, "songs": [{"tag": 0, "score": 273, "title": "Billie Jean", "message": "OK (match type 6)", "artist_id": "ARXPPEY1187FB51DF4", "artist_name": "Michael Jackson", "id": "SOJIZLV12A58A78309"}]}}
(you can also use GET, see the API description)
Or you can host your own [Echoprint server]( "echoprint-server") and ingest or query to that.

0 comments on commit b1605d5

Please sign in to comment.