Get Track's Audio Analysis
Deprecated
audioAnalysis().retrieve(AudioAnalysisRetrieveParamsparams = AudioAnalysisRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none()) : AudioAnalysisRetrieveResponse
GET/audio-analysis/{id}
Get a low-level audio analysis for a track in the Spotify catalog. The audio analysis describes the track’s structure and musical content, including rhythm, pitch, and timbre.
Parameters
Returns
Get Track's Audio Analysis
package dev.cjav.spotted.example
import dev.cjav.spotted.client.SpottedClient
import dev.cjav.spotted.client.okhttp.SpottedOkHttpClient
import dev.cjav.spotted.models.audioanalysis.AudioAnalysisRetrieveParams
import dev.cjav.spotted.models.audioanalysis.AudioAnalysisRetrieveResponse
fun main() {
val client: SpottedClient = SpottedOkHttpClient.fromEnv()
val audioAnalysis: AudioAnalysisRetrieveResponse = client.audioAnalysis().retrieve("11dFghVXANMlKmJXsNCbNl")
}{
"bars": [
{
"confidence": 0.925,
"duration": 2.18749,
"published": true,
"start": 0.49567
}
],
"beats": [
{
"confidence": 0.925,
"duration": 2.18749,
"published": true,
"start": 0.49567
}
],
"meta": {
"analysis_time": 6.93906,
"analyzer_version": "4.0.0",
"detailed_status": "OK",
"input_process": "libvorbisfile L+R 44100->22050",
"platform": "Linux",
"status_code": 0,
"timestamp": 1495193577
},
"published": true,
"sections": [
{
"confidence": 1,
"duration": 6.97092,
"key": 9,
"key_confidence": 0.297,
"loudness": -14.938,
"mode": -1,
"mode_confidence": 0.471,
"published": true,
"start": 0,
"tempo": 113.178,
"tempo_confidence": 0.647,
"time_signature": 4,
"time_signature_confidence": 1
}
],
"segments": [
{
"confidence": 0.435,
"duration": 0.19891,
"loudness_end": 0,
"loudness_max": -14.25,
"loudness_max_time": 0.07305,
"loudness_start": -23.053,
"pitches": [
0.212,
0.141,
0.294
],
"published": true,
"start": 0.70154,
"timbre": [
42.115,
64.373,
-0.233
]
}
],
"tatums": [
{
"confidence": 0.925,
"duration": 2.18749,
"published": true,
"start": 0.49567
}
],
"track": {
"analysis_channels": 1,
"analysis_sample_rate": 22050,
"code_version": 3.15,
"codestring": "codestring",
"duration": 207.95985,
"echoprint_version": 4.15,
"echoprintstring": "echoprintstring",
"end_of_fade_in": 0,
"key": 9,
"key_confidence": 0.408,
"loudness": -5.883,
"mode": 0,
"mode_confidence": 0.485,
"num_samples": 4585515,
"offset_seconds": 0,
"rhythm_version": 1,
"rhythmstring": "rhythmstring",
"sample_md5": "sample_md5",
"start_of_fade_out": 201.13705,
"synch_version": 1,
"synchstring": "synchstring",
"tempo": 118.211,
"tempo_confidence": 0.73,
"time_signature": 4,
"time_signature_confidence": 0.994,
"window_seconds": 0
}
}Returns Examples
{
"bars": [
{
"confidence": 0.925,
"duration": 2.18749,
"published": true,
"start": 0.49567
}
],
"beats": [
{
"confidence": 0.925,
"duration": 2.18749,
"published": true,
"start": 0.49567
}
],
"meta": {
"analysis_time": 6.93906,
"analyzer_version": "4.0.0",
"detailed_status": "OK",
"input_process": "libvorbisfile L+R 44100->22050",
"platform": "Linux",
"status_code": 0,
"timestamp": 1495193577
},
"published": true,
"sections": [
{
"confidence": 1,
"duration": 6.97092,
"key": 9,
"key_confidence": 0.297,
"loudness": -14.938,
"mode": -1,
"mode_confidence": 0.471,
"published": true,
"start": 0,
"tempo": 113.178,
"tempo_confidence": 0.647,
"time_signature": 4,
"time_signature_confidence": 1
}
],
"segments": [
{
"confidence": 0.435,
"duration": 0.19891,
"loudness_end": 0,
"loudness_max": -14.25,
"loudness_max_time": 0.07305,
"loudness_start": -23.053,
"pitches": [
0.212,
0.141,
0.294
],
"published": true,
"start": 0.70154,
"timbre": [
42.115,
64.373,
-0.233
]
}
],
"tatums": [
{
"confidence": 0.925,
"duration": 2.18749,
"published": true,
"start": 0.49567
}
],
"track": {
"analysis_channels": 1,
"analysis_sample_rate": 22050,
"code_version": 3.15,
"codestring": "codestring",
"duration": 207.95985,
"echoprint_version": 4.15,
"echoprintstring": "echoprintstring",
"end_of_fade_in": 0,
"key": 9,
"key_confidence": 0.408,
"loudness": -5.883,
"mode": 0,
"mode_confidence": 0.485,
"num_samples": 4585515,
"offset_seconds": 0,
"rhythm_version": 1,
"rhythmstring": "rhythmstring",
"sample_md5": "sample_md5",
"start_of_fade_out": 201.13705,
"synch_version": 1,
"synchstring": "synchstring",
"tempo": 118.211,
"tempo_confidence": 0.73,
"time_signature": 4,
"time_signature_confidence": 0.994,
"window_seconds": 0
}
}

