我正在尝试通过 Echonest API 获取某些 mp3 的歌曲资料。随着 /song/identify 端点被删除(有人知道为什么?从什么时候开始?)我正在成功使用/track/upload和/track/profile端点。
但是,对于我尝试过的所有 mp3,我从未在响应中得到 song_id 字段。并且尝试使用 track_id 参数访问/song/profile失败并显示消息“指定的标识符不存在”。
我不知道为什么会这样。/track/upload 和 /song/profile 组合不应该替换 /song/identify 吗?还是我的 API 使用有误?
示例会话
/跟踪/上传:
$ curl -X POST -H "Content-Type:application/octet-stream" "http://developer.echonest.com/api/v4/track/upload?api_key={API_KEY}&filetype=mp3" --data-binary "@some.mp3"
{"response" : {
"track" : {
"bitrate" : 128,
"status" : "pending",
"samplerate" : 44100,
"release" : "",
"audio_md5" : "a778192f46b14aff8b77fd90ff3674bb",
"artist" : "Michael Jackson",
"analyzer_version" : "3.2.2",
"title" : "Billie Jean",
"id" : "TRAWIST152E4579002",
"md5" : "b231bfa7d4ee4102e52b4495b10f4769"
},
"status" : {
"version" : "4.2",
"message" : "Success",
"code" : 0
}}}
/轨道/个人资料:
curl http://developer.echonest.com/api/v4/track/profile\?api_key\={API_KEY}\&format\=json\&id\=TRAWIST152E4579002\&bucket\=audio_summary
{"response" : {
"track" : {
"bitrate" : 128,
"status" : "complete",
"samplerate" : 44100,
"audio_summary" : {
"speechiness" : 0.0425334097439946,
"energy" : 0.591133932705891,
"instrumentalness" : 0.0294479646761868,
"valence" : 0.869460920263482,
"danceability" : 0.928799121110435,
"mode" : 0,
"tempo" : 117.099,
"duration" : 294.06041,
"loudness" : -6.027,
"key" : 11,
"time_signature" : 4,
"liveness" : 0.038297571421371,
"acousticness" : 0.0121077539216603,
"analysis_url" : "http://echonest-analysis.s3.amazonaws.com/TR/TRAWIST152E4579002/3/full.json?AWSAccessKeyId=AKI...&Expires=1455532971&Signature=ooy..."
},
"audio_md5" : "a778192f46b14aff8b77fd90ff3674bb",
"artist" : "Michael Jackson",
"analyzer_version" : "3.2.2",
"title" : "Billie Jean",
"id" : "TRAWIST152E4579002",
"md5" : "b231bfa7d4ee4102e52b4495b10f4769"
},
"status" : {
"version" : "4.2",
"message" : "Success",
"code" : 0
}}}
/歌曲/个人资料:
curl http://developer.echonest.com/api/v4/song/profile\?api_key\={API_KEY}\&format\=json\&track_id\=TRAWIST152E4579002\&bucket\=audio_summary
{"response" : {
"status" : {
"version" : "4.2",
"message" : "The Identifier specified does not exist: TRAWIST152E4579002",
"code" : 5
}}}