[GH-ISSUE #57] Audio Features Integration #43

Open
opened 2026-02-28 14:30:12 +03:00 by kerem · 5 comments
Owner

Originally created by @shiftgeist on GitHub (May 28, 2021).
Original GitHub issue: https://github.com/jpochyla/psst/issues/57

Spotify has a lot of metadata. It'd be nice to view them to some degree.

Example:

GET https://api.spotify.com/v1/audio-features
{
    "audio_features": [
        {
            "danceability": 0.808,
            "energy": 0.626,
            "key": 7,
            "loudness": -12.733,
            "mode": 1,
            "speechiness": 0.168,
            "acousticness": 0.00187,
            "instrumentalness": 0.159,
            "liveness": 0.376,
            "valence": 0.369,
            "tempo": 123.99,
            "type": "audio_features",
            "id": "4JpKVNYnVcJ8tuMKjAj50A",
            "uri": "spotify:track:4JpKVNYnVcJ8tuMKjAj50A",
            "track_href": "https://api.spotify.com/v1/tracks/4JpKVNYnVcJ8tuMKjAj50A",
            "analysis_url": "http://echonest-analysis.s3.amazonaws.com/TR/WhpYUARk1kNJ_qP0AdKGcDDFKOQTTgsOoINrqyPQjkUnbteuuBiyj_u94iFCSGzdxGiwqQ6d77f4QLL_8=/3/full.json?AWSAccessKeyId=AKIAJRDFEY23UEVW42BQ&Expires=1458063189&Signature=JRE8SDZStpNOdUsPN/PoS49FMtQ%3D",
            "duration_ms": 535223,
            "time_signature": 4
        },
        {
            "danceability": 0.457,
            "energy": 0.815,
            "key": 1,
            "loudness": -7.199,
            "mode": 1,
            "speechiness": 0.034,
            "acousticness": 0.102,
            "instrumentalness": 0.0319,
            "liveness": 0.103,
            "valence": 0.382,
            "tempo": 96.083,
            "type": "audio_features",
            "id": "2NRANZE9UCmPAS5XVbXL40",
            "uri": "spotify:track:2NRANZE9UCmPAS5XVbXL40",
            "track_href": "https://api.spotify.com/v1/tracks/2NRANZE9UCmPAS5XVbXL40",
            "analysis_url": "http://echonest-analysis.s3.amazonaws.com/TR/WhuQhwPDhmEg5TO4JjbJu0my-awIhk3eaXkRd1ofoJ7tXogPnMtbxkTyLOeHXu5Jke0FCIt52saKJyfPM=/3/full.json?AWSAccessKeyId=AKIAJRDFEY23UEVW42BQ&Expires=1458063189&Signature=qfclum7FwTaR/7aQbnBNO0daCsM%3D",
            "duration_ms": 187800,
            "time_signature": 4
        },
        {
            "danceability": 0.281,
            "energy": 0.402,
            "key": 4,
            "loudness": -17.921,
            "mode": 1,
            "speechiness": 0.0291,
            "acousticness": 0.0734,
            "instrumentalness": 0.83,
            "liveness": 0.0593,
            "valence": 0.0748,
            "tempo": 115.7,
            "type": "audio_features",
            "id": "24JygzOLM0EmRQeGtFcIcG",
            "uri": "spotify:track:24JygzOLM0EmRQeGtFcIcG",
            "track_href": "https://api.spotify.com/v1/tracks/24JygzOLM0EmRQeGtFcIcG",
            "analysis_url": "http://echonest-analysis.s3.amazonaws.com/TR/ehbkMg05Ck-FN7p3lV7vd8TUdBCvM6z5mgDiZRv6iSlw8P_b8GYBZ4PRAlOgTl3e5rS34_l3dZGDeYzH4=/3/full.json?AWSAccessKeyId=AKIAJRDFEY23UEVW42BQ&Expires=1458063189&Signature=bnTm0Hcb%2Bxo8ZCmuxm1mY0JY4Hs%3D",
            "duration_ms": 497493,
            "time_signature": 3
        }
    ]
}

Docs: https://developer.spotify.com/documentation/web-api/reference/#endpoint-get-several-audio-features (page is very slow for me)

Originally created by @shiftgeist on GitHub (May 28, 2021). Original GitHub issue: https://github.com/jpochyla/psst/issues/57 Spotify has a lot of metadata. It'd be nice to view them to some degree. Example: ``` GET https://api.spotify.com/v1/audio-features ``` ```json { "audio_features": [ { "danceability": 0.808, "energy": 0.626, "key": 7, "loudness": -12.733, "mode": 1, "speechiness": 0.168, "acousticness": 0.00187, "instrumentalness": 0.159, "liveness": 0.376, "valence": 0.369, "tempo": 123.99, "type": "audio_features", "id": "4JpKVNYnVcJ8tuMKjAj50A", "uri": "spotify:track:4JpKVNYnVcJ8tuMKjAj50A", "track_href": "https://api.spotify.com/v1/tracks/4JpKVNYnVcJ8tuMKjAj50A", "analysis_url": "http://echonest-analysis.s3.amazonaws.com/TR/WhpYUARk1kNJ_qP0AdKGcDDFKOQTTgsOoINrqyPQjkUnbteuuBiyj_u94iFCSGzdxGiwqQ6d77f4QLL_8=/3/full.json?AWSAccessKeyId=AKIAJRDFEY23UEVW42BQ&Expires=1458063189&Signature=JRE8SDZStpNOdUsPN/PoS49FMtQ%3D", "duration_ms": 535223, "time_signature": 4 }, { "danceability": 0.457, "energy": 0.815, "key": 1, "loudness": -7.199, "mode": 1, "speechiness": 0.034, "acousticness": 0.102, "instrumentalness": 0.0319, "liveness": 0.103, "valence": 0.382, "tempo": 96.083, "type": "audio_features", "id": "2NRANZE9UCmPAS5XVbXL40", "uri": "spotify:track:2NRANZE9UCmPAS5XVbXL40", "track_href": "https://api.spotify.com/v1/tracks/2NRANZE9UCmPAS5XVbXL40", "analysis_url": "http://echonest-analysis.s3.amazonaws.com/TR/WhuQhwPDhmEg5TO4JjbJu0my-awIhk3eaXkRd1ofoJ7tXogPnMtbxkTyLOeHXu5Jke0FCIt52saKJyfPM=/3/full.json?AWSAccessKeyId=AKIAJRDFEY23UEVW42BQ&Expires=1458063189&Signature=qfclum7FwTaR/7aQbnBNO0daCsM%3D", "duration_ms": 187800, "time_signature": 4 }, { "danceability": 0.281, "energy": 0.402, "key": 4, "loudness": -17.921, "mode": 1, "speechiness": 0.0291, "acousticness": 0.0734, "instrumentalness": 0.83, "liveness": 0.0593, "valence": 0.0748, "tempo": 115.7, "type": "audio_features", "id": "24JygzOLM0EmRQeGtFcIcG", "uri": "spotify:track:24JygzOLM0EmRQeGtFcIcG", "track_href": "https://api.spotify.com/v1/tracks/24JygzOLM0EmRQeGtFcIcG", "analysis_url": "http://echonest-analysis.s3.amazonaws.com/TR/ehbkMg05Ck-FN7p3lV7vd8TUdBCvM6z5mgDiZRv6iSlw8P_b8GYBZ4PRAlOgTl3e5rS34_l3dZGDeYzH4=/3/full.json?AWSAccessKeyId=AKIAJRDFEY23UEVW42BQ&Expires=1458063189&Signature=bnTm0Hcb%2Bxo8ZCmuxm1mY0JY4Hs%3D", "duration_ms": 497493, "time_signature": 3 } ] } ``` Docs: https://developer.spotify.com/documentation/web-api/reference/#endpoint-get-several-audio-features (page is very slow for me)
Author
Owner

@zrthxn commented on GitHub (Aug 17, 2021):

What would a user want to do with these primarily?
I think spotify uses these to recommend tracks, so will that be the main use? Find other tracks with similar metrics?

<!-- gh-comment-id:900340068 --> @zrthxn commented on GitHub (Aug 17, 2021): What would a user want to do with these primarily? I think spotify uses these to recommend tracks, so will that be the main use? Find other tracks with similar metrics?
Author
Owner

@shiftgeist commented on GitHub (Aug 17, 2021):

@zrthxn yes recommending tracks and finding similar tracks like done on (everynoise.com) is that I thought of.

<!-- gh-comment-id:900344925 --> @shiftgeist commented on GitHub (Aug 17, 2021): @zrthxn yes recommending tracks and finding similar tracks like done on (everynoise.com) is that I thought of.
Author
Owner

@jpochyla commented on GitHub (Aug 18, 2021):

I have a local branch with knobs for some of the recommendation parameters, more work is needed, though.

image
<!-- gh-comment-id:900895405 --> @jpochyla commented on GitHub (Aug 18, 2021): I have a local branch with knobs for some of the recommendation parameters, more work is needed, though. <img width="752" alt="image" src="https://user-images.githubusercontent.com/1055497/129858536-5654b1a6-b042-4ceb-8105-346d96321b99.png">
Author
Owner

@zrthxn commented on GitHub (Aug 18, 2021):

@jpochyla could you create a remote branch for this? I'd like to try to build something for this, maybe something like "tracks similar to..." or playlists of a similar type

<!-- gh-comment-id:900973157 --> @zrthxn commented on GitHub (Aug 18, 2021): @jpochyla could you create a remote branch for this? I'd like to try to build something for this, maybe something like "tracks similar to..." or playlists of a similar type
Author
Owner

@jpochyla commented on GitHub (Aug 18, 2021):

Similar tracks have been in master for a while (right click on track). I've pushed preliminary support for the parameter knobs in a0ae674462. I'm leaving this open, as some of the parameters don't have any knob yet, and we might also want to visualise audio properties of existing tracks.

<!-- gh-comment-id:901137819 --> @jpochyla commented on GitHub (Aug 18, 2021): Similar tracks have been in master for a while (right click on track). I've pushed preliminary support for the parameter knobs in a0ae67446251ce342a6e4e71c2b01c38aed07b99. I'm leaving this open, as some of the parameters don't have any knob yet, and we might also want to visualise audio properties of existing tracks.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/psst#43
No description provided.