1

我要求bucket=audio_summary在 hotttness 中排名很高的歌曲。前 100 首最热门的歌曲全部返回track.status: 'complete',但音频摘要始终是一个空对象。

如何获取和之类time_signature的音频摘要数据tempo?是否track.status: complete暗示此信息应包含在响应中?

Can't Feel My Face 
https://developer.echonest.com/api/v4/track/profile?api_key=*****************&format=json&id=SOMVZDS14DDE5909E7&bucket=audio_summary

  {
    "response": {
      "status": {
        "version": "4.2",
        "code": 0,
        "message": "Success"
      },
      "track": {
        "status": "complete",
        "id": "SOZOIDR14C02B654D4",
        "audio_summary": {}
      }
    }
  }
4

1 回答 1

1

看起来您拥有这首歌的 SongId 而不是 TrackId。如果您在查询中将“track”替换为“song”,您将获得预期的结果。

这个: https ://developer.echonest.com/api/v4/song/profile? api_key= *****************&format=json&id=SOMVZDS14DDE5909E7&bucket=audio_summary

返回这个:

{  
   "response":{  
      "status":{  
         "version":"4.2",
         "code":0,
         "message":"Success"
      },
      "songs":[  
         {  
            "artist_id":"ARYUDWF12F2B89BB33",
            "artist_name":"The Weeknd",
            "id":"SOMVZDS14DDE5909E7",
            "audio_summary":{  
               "key":9,
               "analysis_url":"http://echonest-analysis.s3.amazonaws.com/TR/A7NwGAWSmhnc53M8w1rLk-eA_tsN8OUHaqV5C5FTbb9BnCPZVnxWOGld1wLxJJ-xdNV8xKJbbZlCRSKJc%3D/3/full.json?AWSAccessKeyId=AKIAJRDFEY23UEVW42BQ&Expires=1454028841&Signature=HeUxbEJt4f0ncipjD1Gamtuj08E%3D",
               "energy":0.781735,
               "liveness":0.12022,
               "tempo":107.954,
               "speechiness":0.042317,
               "acousticness":0.124391,
               "instrumentalness":0.0,
               "mode":0,
               "time_signature":4,
               "duration":216.46667,
               "loudness":-5.528,
               "audio_md5":"",
               "valence":0.586261,
               "danceability":0.713659
            },
            "title":"Can't Feel My Face"
         }
      ]
   }
}

我能够追踪到这一点的唯一原因是,将任何 ID 放入轨道 API 会返回您看到的存根响应,并且我能够使用 spotify id 获取这首歌的 audio_summary,所以我知道它是可用的。

于 2016-01-29T00:54:00.527 回答