我使用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