我使用echonest analyzer来上传音轨并从中获取音频特性。将EchoNest API分析器迁移到Spotify
我通过发送一个curl请求来做到这一点。
我意识到API现在已经减轻到Spotify,我不知道我是否仍然可以上传曲目来分析,而不是只分析给定Spotify ID的曲目。
我用这个方法:
$post = array(
"url"=>$title,
"api_key"=>"myAPI",
"format"=>"json"
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, "http://developer.echonest.com/api/v4/track/upload");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = curl_exec($ch);
$result=json_decode($response,true);
$status=$result['response']['track']['status'];
有没有类似的方式与Spotify的做到这一点?谢谢。
我可以使用离线功能分析仪,但我已经使用EchoNest分析仪来训练我的原始模型here。
在http://stackoverflow.com/questions/37202032/uploading-mp3-files-for-analysis-with-spotify-audio-feature-api上回答为No – liftarn