SlideShare una empresa de Scribd logo
1 de 44
Descargar para leer sin conexión
Build rich applications with Spotify catalog data, profile and playlist
management, and more…
Spotify Web API
and Mobile SDKs
Today
Part I (now):
- An overview of the Spotify Web API and some
examples of how it's used
Part II (later):
- A deep dive into the Audio Analysis provided by
the Spotify Web API, how to interpret it, and a
demo showing how to use it for your own projects
The API
Starting with
the basics.
Spotify Web API
Restful API
What can I get?
● Catalog metadata
● User profiles & playlists
● Audio features
● … and more
Access the API from
● Web Browser
● cURL
● API Console
● Your Code
It's FREE!!
What Information Can Be Retrieved?
Albums
Millions of albums with
● Cover art
● Data on available markets,
copyrights, genres, IDs, popularity
Artists
Millions of artists with
● Artists images
● Data on followers, genres, IDs, related
artists, popularity, top tracks
Tracks
30+ Million tracks
● 30 second previews (most tracks)
● Data on artists, available markets,
explicit lyrics, IDs, popularity
Playlists
2+ billion playlists with
● Full track listings
● Playlist images
● Data on followers
User Profiles
Spotify user profiles with
● Profile images
● Data on country, followers and
following, subscriptions
● Top Tracks and Artists
And more...
● Search across albums, artists, tracks
and playlists
● Top lists & new releases
● Browse by category
● Track recommendations
● Audio features
Audio Features of a track
Audio features available
https://developer.spotify.com/web-api/get-audio-features
Acousticness
Danceability
Energy
Instrumentalness
Key
Liveness
Loudness
Mode
Speechiness
Tempo
Time Signature
Valence
Get audio feature information about one or several tracks.
Audio Analysis of a track
Audio analysis available
https://developer.spotify.com/web-api/get-audio-analysis
http://docs.echonest.com.s3-website-us-east-1.amazonaws.com/_static/AnalyzeDocumentation.pdf
Bars
Beats
Sections
Segments
Pitches
Timbre
Tatums
Echoprint data
Deep and complex information about a track
What Data Can Be Managed?
Followers
Follow and unfollow...
● Artists
● Users
● Playlists
User’s Saved Tracks
In “Your Library”...
● Save tracks
● Remove tracks
● Check what’s saved
Playlists
● Create
● Rename
● Change public status
● Add, Remove & Replace Tracks
OAuth
The Web API uses the Spotify
Accounts Service at
https://accounts.spotify.com
to manage the secure login and
authentication of application users,
and asks for permission to manage
all sensitive user data.
How do I get
started?
Documentation and support for all APIs, SDKs
and widgets.
● Comprehensive user guides, reference manuals,
code examples & tutorials
● Full terms of use & FAQ
● Design resources & guides
● News and newsletter subscription service
https://developer.spotify.com
The Spotify Developer Website
● Quickly test your API calls
● Full support for all parameters, field filters, and
request body data
● Sample data and default values
● Full support for OAuth tokens and scopes
● Full JSON responses with HTTP headers and
status codes
● cURL syntax and bookmarks
Interactive API Console
https://developer.spotify.com/web-api/console/
● Exhibit your apps in our high-profile app
gallery
● See the apps others are building and get
ideas for your own apps
● Follow links to code repositories and
download the code
● Most apps are open source!
Spotify Developer Showcase
https://developer.spotify.com/showcase/
Make a playlists from a show
● Analyses set lists (from setlist.fm) and makes a
playlist
● Uses Spotify Web API playlist endpoint to
save playlists
● Uses Spotify Accounts Service to get user’s
permission to save playlist
Example: The Set Listener
https://github.com/plamere/SetListener
An entire client built on the Web API
Uses Spotify Web Api endpoints to retrieve
user’s playlists, tracks, personalisation, and
enable search
Example: Spotify on Playstation and TV
Spotify iOS & Android
SDKs
● Lightweight, native SDKs
● Full user authentication, audio playback
(premium users only)
● Complete API reference manual and
beginner's tutorial
● Code examples and wrappers
Makes it easy to add music streaming, user
authentication and other Spotify features to iOS apps.
The SDK consists of a small footprint binary library and a set of API header files. It
is packaged as an Xcode project and includes APIs for:
● User authentication
● Audio playback and stream management (for premium users only)
● Metadata (artist, album, track) lookup including artwork
● Playlist management
● User’s Your Music Library management
Registering your bundle ID
To communicate with Spotify you need to register your application’s bundle id
section in the Developer Portal. This value is used to authenticate your application
against Spotify client.
Spotify iOS SDK (beta)
Runkeeper uses the iOS SDK to connect
users to their Spotify playlists
https://developer.spotify.com/technologies/spotify-ios-sdk/
Makes it easy to add music streaming, user authentication
and other Spotify features to Android apps.
The SDK contains two small footprint binary libraries packaged as Android archives (AAR):
● Spotify Authentication Library. This library provides a way to obtain OAuth
access tokens that can subsequently be used to play music or used in calls to the
Spotify Web API.
● Spotify Player Library. This library contains classes for audio playback and
stream management (for premium users only). It takes care of all negotiation with
backend Spotify services, including digital rights management and decoding.
The Android SDK does not currently have functions for metadata lookup or playlist
management. For that, you need to use the Web API, with which you can communicate
after receiving an OAuth token from the SDK.
Android SDK (beta)
Shazam uses the Android SDK to
play full audio tracks
https://developer.spotify.com/technologies/spotify-android-sdk/
How do I build?
A streaming mobile app for
Spotify Premium
subscribers?
Android / iOS SDK
A data-rich non-streaming web
application for any Spotify user?
Web API
A simple Spotify-powered
webpage for my band, my
company, or myself?
Play Button
+
Follow Button
+
Web API
Spotify APIs / SDKs
Web API - https://developer.spotify.com/web-api/
Android SDK - https://developer.spotify.com/technologies/spotify-android-sdk/
iOS SDK - https://developer.spotify.com/technologies/spotify-ios-sdk/
HTML Widgets - https://developer.spotify.com/technologies/widgets/
tag: spotify
Get support!
@SpotifyPlatform
Fin.
(part I)
Build rich applications with Spotify catalog data, profile and playlist
management, and more…
Audio Analysis with
Spotify's Web API
Easy for people.
Hard for computers.
Let's talk
about
audio.
Audio Features of a track
Audio features available
https://developer.spotify.com/web-api/get-audio-features
Acousticness
Danceability
Energy
Instrumentalness
Key
Liveness
Loudness
Mode
Speechiness
Tempo
Time Signature
Valence
Get audio feature information about one or several tracks.
Audio Features
{
"danceability": 0.956,
"energy": 0.795,
"key": 7,
"loudness": -5.311,
"mode": 1,
"speechiness": 0.15,
"acousticness": 0.00356,
"instrumentalness": 0.889,
"liveness": 0.0906,
"valence": 0.841,
"tempo": 121.294,
"type": "audio_features",
"id": "1pKYYY0dkg23sQQXi0Q5zN",
"uri": "spotify:track:1pKYYY0dkg23sQQXi0Q5zN",
"track_href": "https://api.spotify.com/v1/tracks/1pKYYY0dkg23sQQXi0Q5zN",
"analysis_url": "https://api.spotify.com/v1/audio-analysis/1pKYYY0dkg23sQQXi0Q5zN",
"duration_ms": 429533,
"time_signature": 4
}
Audio Features of a track
Audio Analysis of a track
Audio analysis available
https://developer.spotify.com/web-api/get-audio-analysis
http://docs.echonest.com.s3-website-us-east-1.amazonaws.com/_static/AnalyzeDocumentation.pdf
Bars
Beats
Sections
Segments
Pitches
Timbre
Tatums
Echoprint data
Deep and complex information about a track
The what?
A music terminology
crash course.
Time Signature
1 Bar
1 Beat (in this case)
{
"start": 0.49557,
"duration": 0.49833,
"confidence": 0.978
},
{
"start": 0.99391,
"duration": 0.49336,
"confidence": 0.958
},
…
Bars, Beats, and Tatums
- Start time of the chunk
- Duration of the chunk
- Confidence of the chunk
(remember, these are
estimated!)
Beat: the basic time unit of a piece of music; for example, each tick of a
metronome
Beats
Tatum: the lowest regular pulse train that a listener intuitively infers from
the timing of perceived musical events (segments)
Tatums
* not used very often
Bar: a segment of time defined as a given number of beats. Bar offsets
also indicate downbeats, the first beat of the measure.
Bars
- Defined by large variations in
rhythm or timbre, e.g. chorus,
verse, bridge, guitar solo, etc
- Each section contains its own
descriptions of tempo, key,
mode, time_signature, and
loudness
- Disclaimer: They're not great
(IMO)
Sections
{
"start": 0,
"duration": 20.77904,
"confidence": 1,
"loudness": -22.169,
"tempo": 121.215,
"tempo_confidence": 0.9,
"key": 9,
"key_confidence": 0,
"mode": 0,
"mode_confidence": 0,
"time_signature": 4,
"time_signature_confidence": 1
},
{
"start": 0.73633,
"duration": 0.23265,
"confidence": 0.844,
"loudness_start": -40.031,
"loudness_max_time": 0.01147,
"loudness_max": -27.975,
"pitches": [
0.132,
0.106,
...
],
"timbre": [
26.205,
-254.481,
…
]
},
Segments
- A set of sound entities
(typically under a second)
each relatively uniform in
timbre and harmony
- Characterized by their
perceptual onsets and
duration in seconds, loudness
(dB), pitch and timbral
content
- Content is given by a “chroma” vector
- Corresponding to the 12 pitch classes C, C#, D to B, with values
ranging from 0 to 1 that describe the relative dominance of every
pitch in the chromatic scale
- a C Major chord would likely be represented by large values of C, E and G (i.e.
classes 0, 4, and 7)
- Vectors are normalized to 1 by their strongest dimension
- noisy sounds are likely represented by values that are all close to 1
- pure tones are described by one value at 1 (the pitch) and others near 0
Pitch
Pitch
- The quality of a musical note or sound that distinguishes different
types of musical instruments, or voices
- Represented as a vector that includes 12 unbounded values
roughly centered around 0
- the first dimension represents the average loudness of the segment
- second emphasizes brightness
- third is more closely correlated to the flatness of a sound
- fourth to sounds with a stronger attack
- etc
- Best used in comparison with each other
Timbre
Timbre
50
ms
X ms PCA
460 floats / segment
12 floats / segment
dimensionality reduction
basis functions
I hope this works...
Demo time
https://github.com/markkohdev/spotify-api-starter
The "Hackathon Starter Pack"
Thank You!

Más contenido relacionado

La actualidad más candente

スマホアプリにおけるマルチプレイアクションゲーム開発の実例紹介
スマホアプリにおけるマルチプレイアクションゲーム開発の実例紹介スマホアプリにおけるマルチプレイアクションゲーム開発の実例紹介
スマホアプリにおけるマルチプレイアクションゲーム開発の実例紹介aktsk
 
Apache Avro vs Protocol Buffers
Apache Avro vs Protocol BuffersApache Avro vs Protocol Buffers
Apache Avro vs Protocol BuffersSeiya Mizuno
 
サルでもわかるディープラーニング入門 (2017年) (In Japanese)
サルでもわかるディープラーニング入門 (2017年) (In Japanese)サルでもわかるディープラーニング入門 (2017年) (In Japanese)
サルでもわかるディープラーニング入門 (2017年) (In Japanese)Toshihiko Yamakami
 
BigQueryで集計するシステムを作って分かったKPI集計ツール作成
BigQueryで集計するシステムを作って分かったKPI集計ツール作成BigQueryで集計するシステムを作って分かったKPI集計ツール作成
BigQueryで集計するシステムを作って分かったKPI集計ツール作成(shibao)芝尾 (kouichiro)幸一郎
 
Python 3.9からの新定番zoneinfoを使いこなそう
Python 3.9からの新定番zoneinfoを使いこなそうPython 3.9からの新定番zoneinfoを使いこなそう
Python 3.9からの新定番zoneinfoを使いこなそうRyuji Tsutsui
 
Yahoo! JAPANのIaaSを支えるKubernetesクラスタ、アップデート自動化への挑戦 #yjtc
Yahoo! JAPANのIaaSを支えるKubernetesクラスタ、アップデート自動化への挑戦 #yjtcYahoo! JAPANのIaaSを支えるKubernetesクラスタ、アップデート自動化への挑戦 #yjtc
Yahoo! JAPANのIaaSを支えるKubernetesクラスタ、アップデート自動化への挑戦 #yjtcYahoo!デベロッパーネットワーク
 
Presto As A Service - Treasure DataでのPresto運用事例
Presto As A Service - Treasure DataでのPresto運用事例Presto As A Service - Treasure DataでのPresto運用事例
Presto As A Service - Treasure DataでのPresto運用事例Taro L. Saito
 
Keycloak & midPoint の紹介
Keycloak & midPoint の紹介Keycloak & midPoint の紹介
Keycloak & midPoint の紹介Hiroyuki Wada
 
分散ワークフローエンジン『Digdag』の実装 at Tokyo RubyKaigi #11
分散ワークフローエンジン『Digdag』の実装 at Tokyo RubyKaigi #11分散ワークフローエンジン『Digdag』の実装 at Tokyo RubyKaigi #11
分散ワークフローエンジン『Digdag』の実装 at Tokyo RubyKaigi #11Sadayuki Furuhashi
 
決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1
決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1
決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1Toshiaki Maki
 
Pythonの理解を試みる 〜バイトコードインタプリタを作成する〜
Pythonの理解を試みる 〜バイトコードインタプリタを作成する〜Pythonの理解を試みる 〜バイトコードインタプリタを作成する〜
Pythonの理解を試みる 〜バイトコードインタプリタを作成する〜Preferred Networks
 
Amazon SageMakerでカスタムコンテナを使った学習
Amazon SageMakerでカスタムコンテナを使った学習Amazon SageMakerでカスタムコンテナを使った学習
Amazon SageMakerでカスタムコンテナを使った学習西岡 賢一郎
 
実践!OpenTelemetry と OSS を使った Observability 基盤の構築(CloudNative Days Tokyo 2022 発...
実践!OpenTelemetry と OSS を使った Observability 基盤の構築(CloudNative Days Tokyo 2022 発...実践!OpenTelemetry と OSS を使った Observability 基盤の構築(CloudNative Days Tokyo 2022 発...
実践!OpenTelemetry と OSS を使った Observability 基盤の構築(CloudNative Days Tokyo 2022 発...NTT DATA Technology & Innovation
 
推薦アルゴリズムの今までとこれから
推薦アルゴリズムの今までとこれから推薦アルゴリズムの今までとこれから
推薦アルゴリズムの今までとこれからcyberagent
 
Kubernetesでの性能解析 ~なんとなく遅いからの脱却~(Kubernetes Meetup Tokyo #33 発表資料)
Kubernetesでの性能解析 ~なんとなく遅いからの脱却~(Kubernetes Meetup Tokyo #33 発表資料)Kubernetesでの性能解析 ~なんとなく遅いからの脱却~(Kubernetes Meetup Tokyo #33 発表資料)
Kubernetesでの性能解析 ~なんとなく遅いからの脱却~(Kubernetes Meetup Tokyo #33 発表資料)NTT DATA Technology & Innovation
 
(2017.6.9) Neo4jの可視化ライブラリまとめ
(2017.6.9) Neo4jの可視化ライブラリまとめ(2017.6.9) Neo4jの可視化ライブラリまとめ
(2017.6.9) Neo4jの可視化ライブラリまとめMitsutoshi Kiuchi
 

La actualidad más candente (20)

スマホアプリにおけるマルチプレイアクションゲーム開発の実例紹介
スマホアプリにおけるマルチプレイアクションゲーム開発の実例紹介スマホアプリにおけるマルチプレイアクションゲーム開発の実例紹介
スマホアプリにおけるマルチプレイアクションゲーム開発の実例紹介
 
Apache Avro vs Protocol Buffers
Apache Avro vs Protocol BuffersApache Avro vs Protocol Buffers
Apache Avro vs Protocol Buffers
 
サルでもわかるディープラーニング入門 (2017年) (In Japanese)
サルでもわかるディープラーニング入門 (2017年) (In Japanese)サルでもわかるディープラーニング入門 (2017年) (In Japanese)
サルでもわかるディープラーニング入門 (2017年) (In Japanese)
 
BigQueryで集計するシステムを作って分かったKPI集計ツール作成
BigQueryで集計するシステムを作って分かったKPI集計ツール作成BigQueryで集計するシステムを作って分かったKPI集計ツール作成
BigQueryで集計するシステムを作って分かったKPI集計ツール作成
 
KafkaとPulsar
KafkaとPulsarKafkaとPulsar
KafkaとPulsar
 
Python 3.9からの新定番zoneinfoを使いこなそう
Python 3.9からの新定番zoneinfoを使いこなそうPython 3.9からの新定番zoneinfoを使いこなそう
Python 3.9からの新定番zoneinfoを使いこなそう
 
Yahoo! JAPANのIaaSを支えるKubernetesクラスタ、アップデート自動化への挑戦 #yjtc
Yahoo! JAPANのIaaSを支えるKubernetesクラスタ、アップデート自動化への挑戦 #yjtcYahoo! JAPANのIaaSを支えるKubernetesクラスタ、アップデート自動化への挑戦 #yjtc
Yahoo! JAPANのIaaSを支えるKubernetesクラスタ、アップデート自動化への挑戦 #yjtc
 
Presto As A Service - Treasure DataでのPresto運用事例
Presto As A Service - Treasure DataでのPresto運用事例Presto As A Service - Treasure DataでのPresto運用事例
Presto As A Service - Treasure DataでのPresto運用事例
 
ゼロから始める転移学習
ゼロから始める転移学習ゼロから始める転移学習
ゼロから始める転移学習
 
Keycloak & midPoint の紹介
Keycloak & midPoint の紹介Keycloak & midPoint の紹介
Keycloak & midPoint の紹介
 
分散ワークフローエンジン『Digdag』の実装 at Tokyo RubyKaigi #11
分散ワークフローエンジン『Digdag』の実装 at Tokyo RubyKaigi #11分散ワークフローエンジン『Digdag』の実装 at Tokyo RubyKaigi #11
分散ワークフローエンジン『Digdag』の実装 at Tokyo RubyKaigi #11
 
決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1
決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1
決済システムの内製化への旅 - SpringとPCFで作るクラウドネイティブなシステム開発 #jsug #sf_h1
 
Pythonの理解を試みる 〜バイトコードインタプリタを作成する〜
Pythonの理解を試みる 〜バイトコードインタプリタを作成する〜Pythonの理解を試みる 〜バイトコードインタプリタを作成する〜
Pythonの理解を試みる 〜バイトコードインタプリタを作成する〜
 
LakeTahoe
LakeTahoeLakeTahoe
LakeTahoe
 
Amazon SageMakerでカスタムコンテナを使った学習
Amazon SageMakerでカスタムコンテナを使った学習Amazon SageMakerでカスタムコンテナを使った学習
Amazon SageMakerでカスタムコンテナを使った学習
 
実践!OpenTelemetry と OSS を使った Observability 基盤の構築(CloudNative Days Tokyo 2022 発...
実践!OpenTelemetry と OSS を使った Observability 基盤の構築(CloudNative Days Tokyo 2022 発...実践!OpenTelemetry と OSS を使った Observability 基盤の構築(CloudNative Days Tokyo 2022 発...
実践!OpenTelemetry と OSS を使った Observability 基盤の構築(CloudNative Days Tokyo 2022 発...
 
推薦アルゴリズムの今までとこれから
推薦アルゴリズムの今までとこれから推薦アルゴリズムの今までとこれから
推薦アルゴリズムの今までとこれから
 
Kubernetesでの性能解析 ~なんとなく遅いからの脱却~(Kubernetes Meetup Tokyo #33 発表資料)
Kubernetesでの性能解析 ~なんとなく遅いからの脱却~(Kubernetes Meetup Tokyo #33 発表資料)Kubernetesでの性能解析 ~なんとなく遅いからの脱却~(Kubernetes Meetup Tokyo #33 発表資料)
Kubernetesでの性能解析 ~なんとなく遅いからの脱却~(Kubernetes Meetup Tokyo #33 発表資料)
 
Kafka・Storm・ZooKeeperの認証と認可について #kafkajp
Kafka・Storm・ZooKeeperの認証と認可について #kafkajpKafka・Storm・ZooKeeperの認証と認可について #kafkajp
Kafka・Storm・ZooKeeperの認証と認可について #kafkajp
 
(2017.6.9) Neo4jの可視化ライブラリまとめ
(2017.6.9) Neo4jの可視化ライブラリまとめ(2017.6.9) Neo4jの可視化ライブラリまとめ
(2017.6.9) Neo4jの可視化ライブラリまとめ
 

Similar a Audio Analysis with Spotify's Web API

Automatic Discovery of Service Metadata for Systems at Scale
Automatic Discovery of Service Metadata for Systems at ScaleAutomatic Discovery of Service Metadata for Systems at Scale
Automatic Discovery of Service Metadata for Systems at ScaleMartina Iglesias Fernández
 
Last.fm API workshop - Stockholm
Last.fm API workshop - StockholmLast.fm API workshop - Stockholm
Last.fm API workshop - StockholmMatthew Ogle
 
Sound cloud Detail company
Sound cloud Detail companySound cloud Detail company
Sound cloud Detail companySimson Toppo
 
Application Programming Interfaces
Application Programming InterfacesApplication Programming Interfaces
Application Programming InterfacesCindy Royal
 
SoundCloud @ Music Hackday Barcelona 2010
SoundCloud @ Music Hackday Barcelona 2010SoundCloud @ Music Hackday Barcelona 2010
SoundCloud @ Music Hackday Barcelona 2010Eric Wahlforss
 
APIエコノミー時代の認証・認可
APIエコノミー時代の認証・認可APIエコノミー時代の認証・認可
APIエコノミー時代の認証・認可Tatsuo Kudo
 
Get On The Audiobus (CocoaConf Atlanta, November 2013)
Get On The Audiobus (CocoaConf Atlanta, November 2013)Get On The Audiobus (CocoaConf Atlanta, November 2013)
Get On The Audiobus (CocoaConf Atlanta, November 2013)Chris Adamson
 
Get On The Audiobus (CocoaConf Boston, October 2013)
Get On The Audiobus (CocoaConf Boston, October 2013)Get On The Audiobus (CocoaConf Boston, October 2013)
Get On The Audiobus (CocoaConf Boston, October 2013)Chris Adamson
 
Overview This assignment is designed to have you practice working wit.pdf
 Overview This assignment is designed to have you practice working wit.pdf Overview This assignment is designed to have you practice working wit.pdf
Overview This assignment is designed to have you practice working wit.pdfkarthik12341
 
Seattle bot + Twitter data prezo
Seattle bot + Twitter data prezoSeattle bot + Twitter data prezo
Seattle bot + Twitter data prezoHarrison Neff
 
Soundrop at app academy des 2012
Soundrop at app academy des 2012Soundrop at app academy des 2012
Soundrop at app academy des 2012Inge Andre Sandvik
 
A Complete Guide on How to Develop Music Streaming App
A Complete Guide on How to Develop Music Streaming AppA Complete Guide on How to Develop Music Streaming App
A Complete Guide on How to Develop Music Streaming AppXongoLab Technologies LLP
 
Piwik Analytics Platform
Piwik Analytics PlatformPiwik Analytics Platform
Piwik Analytics Platformpiwik
 
[WSO2Con Asia 2018] Managing API Integrations with WSO2 API Manager
[WSO2Con Asia 2018] Managing API Integrations with WSO2 API Manager[WSO2Con Asia 2018] Managing API Integrations with WSO2 API Manager
[WSO2Con Asia 2018] Managing API Integrations with WSO2 API ManagerWSO2
 
LikeCoin SDK and API sharing
LikeCoin SDK and API sharingLikeCoin SDK and API sharing
LikeCoin SDK and API sharingWilliam Chong
 
Getting Started with Titanium
Getting Started with TitaniumGetting Started with Titanium
Getting Started with TitaniumKevin Whinnery
 
REST Coder: Auto Generating Client Stubs and Documentation for REST APIs
REST Coder: Auto Generating Client Stubs and Documentation for REST APIsREST Coder: Auto Generating Client Stubs and Documentation for REST APIs
REST Coder: Auto Generating Client Stubs and Documentation for REST APIsHiranya Jayathilaka
 
2022 APIsecure_Securing APIs with Open Standards
2022 APIsecure_Securing APIs with Open Standards2022 APIsecure_Securing APIs with Open Standards
2022 APIsecure_Securing APIs with Open StandardsAPIsecure_ Official
 

Similar a Audio Analysis with Spotify's Web API (20)

Automatic Discovery of Service Metadata for Systems at Scale
Automatic Discovery of Service Metadata for Systems at ScaleAutomatic Discovery of Service Metadata for Systems at Scale
Automatic Discovery of Service Metadata for Systems at Scale
 
Last.fm API workshop - Stockholm
Last.fm API workshop - StockholmLast.fm API workshop - Stockholm
Last.fm API workshop - Stockholm
 
Sound cloud Detail company
Sound cloud Detail companySound cloud Detail company
Sound cloud Detail company
 
Application Programming Interfaces
Application Programming InterfacesApplication Programming Interfaces
Application Programming Interfaces
 
SoundCloud @ Music Hackday Barcelona 2010
SoundCloud @ Music Hackday Barcelona 2010SoundCloud @ Music Hackday Barcelona 2010
SoundCloud @ Music Hackday Barcelona 2010
 
APIエコノミー時代の認証・認可
APIエコノミー時代の認証・認可APIエコノミー時代の認証・認可
APIエコノミー時代の認証・認可
 
Get On The Audiobus (CocoaConf Atlanta, November 2013)
Get On The Audiobus (CocoaConf Atlanta, November 2013)Get On The Audiobus (CocoaConf Atlanta, November 2013)
Get On The Audiobus (CocoaConf Atlanta, November 2013)
 
Get On The Audiobus (CocoaConf Boston, October 2013)
Get On The Audiobus (CocoaConf Boston, October 2013)Get On The Audiobus (CocoaConf Boston, October 2013)
Get On The Audiobus (CocoaConf Boston, October 2013)
 
Overview This assignment is designed to have you practice working wit.pdf
 Overview This assignment is designed to have you practice working wit.pdf Overview This assignment is designed to have you practice working wit.pdf
Overview This assignment is designed to have you practice working wit.pdf
 
Seattle bot + Twitter data prezo
Seattle bot + Twitter data prezoSeattle bot + Twitter data prezo
Seattle bot + Twitter data prezo
 
Soundrop at app academy des 2012
Soundrop at app academy des 2012Soundrop at app academy des 2012
Soundrop at app academy des 2012
 
A Complete Guide on How to Develop Music Streaming App
A Complete Guide on How to Develop Music Streaming AppA Complete Guide on How to Develop Music Streaming App
A Complete Guide on How to Develop Music Streaming App
 
Piwik Analytics Platform
Piwik Analytics PlatformPiwik Analytics Platform
Piwik Analytics Platform
 
[WSO2Con Asia 2018] Managing API Integrations with WSO2 API Manager
[WSO2Con Asia 2018] Managing API Integrations with WSO2 API Manager[WSO2Con Asia 2018] Managing API Integrations with WSO2 API Manager
[WSO2Con Asia 2018] Managing API Integrations with WSO2 API Manager
 
LikeCoin SDK and API sharing
LikeCoin SDK and API sharingLikeCoin SDK and API sharing
LikeCoin SDK and API sharing
 
Getting Started with Titanium
Getting Started with TitaniumGetting Started with Titanium
Getting Started with Titanium
 
Getting Started with Titanium
Getting Started with TitaniumGetting Started with Titanium
Getting Started with Titanium
 
REST Coder: Auto Generating Client Stubs and Documentation for REST APIs
REST Coder: Auto Generating Client Stubs and Documentation for REST APIsREST Coder: Auto Generating Client Stubs and Documentation for REST APIs
REST Coder: Auto Generating Client Stubs and Documentation for REST APIs
 
2022 APIsecure_Securing APIs with Open Standards
2022 APIsecure_Securing APIs with Open Standards2022 APIsecure_Securing APIs with Open Standards
2022 APIsecure_Securing APIs with Open Standards
 
Podcasting
PodcastingPodcasting
Podcasting
 

Último

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 

Último (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 

Audio Analysis with Spotify's Web API

  • 1. Build rich applications with Spotify catalog data, profile and playlist management, and more… Spotify Web API and Mobile SDKs
  • 2. Today Part I (now): - An overview of the Spotify Web API and some examples of how it's used Part II (later): - A deep dive into the Audio Analysis provided by the Spotify Web API, how to interpret it, and a demo showing how to use it for your own projects
  • 4. Spotify Web API Restful API What can I get? ● Catalog metadata ● User profiles & playlists ● Audio features ● … and more Access the API from ● Web Browser ● cURL ● API Console ● Your Code It's FREE!!
  • 5. What Information Can Be Retrieved? Albums Millions of albums with ● Cover art ● Data on available markets, copyrights, genres, IDs, popularity Artists Millions of artists with ● Artists images ● Data on followers, genres, IDs, related artists, popularity, top tracks Tracks 30+ Million tracks ● 30 second previews (most tracks) ● Data on artists, available markets, explicit lyrics, IDs, popularity Playlists 2+ billion playlists with ● Full track listings ● Playlist images ● Data on followers User Profiles Spotify user profiles with ● Profile images ● Data on country, followers and following, subscriptions ● Top Tracks and Artists And more... ● Search across albums, artists, tracks and playlists ● Top lists & new releases ● Browse by category ● Track recommendations ● Audio features
  • 6. Audio Features of a track Audio features available https://developer.spotify.com/web-api/get-audio-features Acousticness Danceability Energy Instrumentalness Key Liveness Loudness Mode Speechiness Tempo Time Signature Valence Get audio feature information about one or several tracks.
  • 7. Audio Analysis of a track Audio analysis available https://developer.spotify.com/web-api/get-audio-analysis http://docs.echonest.com.s3-website-us-east-1.amazonaws.com/_static/AnalyzeDocumentation.pdf Bars Beats Sections Segments Pitches Timbre Tatums Echoprint data Deep and complex information about a track
  • 8. What Data Can Be Managed? Followers Follow and unfollow... ● Artists ● Users ● Playlists User’s Saved Tracks In “Your Library”... ● Save tracks ● Remove tracks ● Check what’s saved Playlists ● Create ● Rename ● Change public status ● Add, Remove & Replace Tracks OAuth The Web API uses the Spotify Accounts Service at https://accounts.spotify.com to manage the secure login and authentication of application users, and asks for permission to manage all sensitive user data.
  • 9. How do I get started?
  • 10. Documentation and support for all APIs, SDKs and widgets. ● Comprehensive user guides, reference manuals, code examples & tutorials ● Full terms of use & FAQ ● Design resources & guides ● News and newsletter subscription service https://developer.spotify.com The Spotify Developer Website
  • 11. ● Quickly test your API calls ● Full support for all parameters, field filters, and request body data ● Sample data and default values ● Full support for OAuth tokens and scopes ● Full JSON responses with HTTP headers and status codes ● cURL syntax and bookmarks Interactive API Console https://developer.spotify.com/web-api/console/
  • 12. ● Exhibit your apps in our high-profile app gallery ● See the apps others are building and get ideas for your own apps ● Follow links to code repositories and download the code ● Most apps are open source! Spotify Developer Showcase https://developer.spotify.com/showcase/
  • 13. Make a playlists from a show ● Analyses set lists (from setlist.fm) and makes a playlist ● Uses Spotify Web API playlist endpoint to save playlists ● Uses Spotify Accounts Service to get user’s permission to save playlist Example: The Set Listener https://github.com/plamere/SetListener
  • 14. An entire client built on the Web API Uses Spotify Web Api endpoints to retrieve user’s playlists, tracks, personalisation, and enable search Example: Spotify on Playstation and TV
  • 15. Spotify iOS & Android SDKs ● Lightweight, native SDKs ● Full user authentication, audio playback (premium users only) ● Complete API reference manual and beginner's tutorial ● Code examples and wrappers
  • 16. Makes it easy to add music streaming, user authentication and other Spotify features to iOS apps. The SDK consists of a small footprint binary library and a set of API header files. It is packaged as an Xcode project and includes APIs for: ● User authentication ● Audio playback and stream management (for premium users only) ● Metadata (artist, album, track) lookup including artwork ● Playlist management ● User’s Your Music Library management Registering your bundle ID To communicate with Spotify you need to register your application’s bundle id section in the Developer Portal. This value is used to authenticate your application against Spotify client. Spotify iOS SDK (beta) Runkeeper uses the iOS SDK to connect users to their Spotify playlists https://developer.spotify.com/technologies/spotify-ios-sdk/
  • 17. Makes it easy to add music streaming, user authentication and other Spotify features to Android apps. The SDK contains two small footprint binary libraries packaged as Android archives (AAR): ● Spotify Authentication Library. This library provides a way to obtain OAuth access tokens that can subsequently be used to play music or used in calls to the Spotify Web API. ● Spotify Player Library. This library contains classes for audio playback and stream management (for premium users only). It takes care of all negotiation with backend Spotify services, including digital rights management and decoding. The Android SDK does not currently have functions for metadata lookup or playlist management. For that, you need to use the Web API, with which you can communicate after receiving an OAuth token from the SDK. Android SDK (beta) Shazam uses the Android SDK to play full audio tracks https://developer.spotify.com/technologies/spotify-android-sdk/
  • 18. How do I build? A streaming mobile app for Spotify Premium subscribers? Android / iOS SDK A data-rich non-streaming web application for any Spotify user? Web API A simple Spotify-powered webpage for my band, my company, or myself? Play Button + Follow Button + Web API
  • 19. Spotify APIs / SDKs Web API - https://developer.spotify.com/web-api/ Android SDK - https://developer.spotify.com/technologies/spotify-android-sdk/ iOS SDK - https://developer.spotify.com/technologies/spotify-ios-sdk/ HTML Widgets - https://developer.spotify.com/technologies/widgets/
  • 22. Build rich applications with Spotify catalog data, profile and playlist management, and more… Audio Analysis with Spotify's Web API
  • 23. Easy for people. Hard for computers. Let's talk about audio.
  • 24. Audio Features of a track Audio features available https://developer.spotify.com/web-api/get-audio-features Acousticness Danceability Energy Instrumentalness Key Liveness Loudness Mode Speechiness Tempo Time Signature Valence Get audio feature information about one or several tracks.
  • 25. Audio Features { "danceability": 0.956, "energy": 0.795, "key": 7, "loudness": -5.311, "mode": 1, "speechiness": 0.15, "acousticness": 0.00356, "instrumentalness": 0.889, "liveness": 0.0906, "valence": 0.841, "tempo": 121.294, "type": "audio_features", "id": "1pKYYY0dkg23sQQXi0Q5zN", "uri": "spotify:track:1pKYYY0dkg23sQQXi0Q5zN", "track_href": "https://api.spotify.com/v1/tracks/1pKYYY0dkg23sQQXi0Q5zN", "analysis_url": "https://api.spotify.com/v1/audio-analysis/1pKYYY0dkg23sQQXi0Q5zN", "duration_ms": 429533, "time_signature": 4 }
  • 26. Audio Features of a track
  • 27. Audio Analysis of a track Audio analysis available https://developer.spotify.com/web-api/get-audio-analysis http://docs.echonest.com.s3-website-us-east-1.amazonaws.com/_static/AnalyzeDocumentation.pdf Bars Beats Sections Segments Pitches Timbre Tatums Echoprint data Deep and complex information about a track
  • 28. The what? A music terminology crash course.
  • 29.
  • 30. Time Signature 1 Bar 1 Beat (in this case)
  • 31.
  • 32. { "start": 0.49557, "duration": 0.49833, "confidence": 0.978 }, { "start": 0.99391, "duration": 0.49336, "confidence": 0.958 }, … Bars, Beats, and Tatums - Start time of the chunk - Duration of the chunk - Confidence of the chunk (remember, these are estimated!)
  • 33. Beat: the basic time unit of a piece of music; for example, each tick of a metronome Beats
  • 34. Tatum: the lowest regular pulse train that a listener intuitively infers from the timing of perceived musical events (segments) Tatums * not used very often
  • 35. Bar: a segment of time defined as a given number of beats. Bar offsets also indicate downbeats, the first beat of the measure. Bars
  • 36. - Defined by large variations in rhythm or timbre, e.g. chorus, verse, bridge, guitar solo, etc - Each section contains its own descriptions of tempo, key, mode, time_signature, and loudness - Disclaimer: They're not great (IMO) Sections { "start": 0, "duration": 20.77904, "confidence": 1, "loudness": -22.169, "tempo": 121.215, "tempo_confidence": 0.9, "key": 9, "key_confidence": 0, "mode": 0, "mode_confidence": 0, "time_signature": 4, "time_signature_confidence": 1 },
  • 37. { "start": 0.73633, "duration": 0.23265, "confidence": 0.844, "loudness_start": -40.031, "loudness_max_time": 0.01147, "loudness_max": -27.975, "pitches": [ 0.132, 0.106, ... ], "timbre": [ 26.205, -254.481, … ] }, Segments - A set of sound entities (typically under a second) each relatively uniform in timbre and harmony - Characterized by their perceptual onsets and duration in seconds, loudness (dB), pitch and timbral content
  • 38. - Content is given by a “chroma” vector - Corresponding to the 12 pitch classes C, C#, D to B, with values ranging from 0 to 1 that describe the relative dominance of every pitch in the chromatic scale - a C Major chord would likely be represented by large values of C, E and G (i.e. classes 0, 4, and 7) - Vectors are normalized to 1 by their strongest dimension - noisy sounds are likely represented by values that are all close to 1 - pure tones are described by one value at 1 (the pitch) and others near 0 Pitch
  • 39. Pitch
  • 40. - The quality of a musical note or sound that distinguishes different types of musical instruments, or voices - Represented as a vector that includes 12 unbounded values roughly centered around 0 - the first dimension represents the average loudness of the segment - second emphasizes brightness - third is more closely correlated to the flatness of a sound - fourth to sounds with a stronger attack - etc - Best used in comparison with each other Timbre
  • 41. Timbre 50 ms X ms PCA 460 floats / segment 12 floats / segment dimensionality reduction basis functions
  • 42. I hope this works... Demo time