Build Status

spotkov

A command line tool to generate a Spotify playlist of songs you might like together using your Last.FM scrobbling history and a Markov chain.

$GOPATH/bin/spotkov -help

Installation

Clone the repository and install Go or if you have Go already, enter go get github.com/snyderks/spotkov. You'll also need API keys for the Spotify and Last.FM web API. Set environment variables (on UNIX, refer to this article (the process is identical on macOS), on Windows, edit your user environment variables at Control Panel -> System -> Advanced System Settings -> Environment Variables...)

  • SPOTIFY_ID: your Spotify API key
  • SPOTIFY_SECRET: your Spotify API secret key
  • LASTFM_KEY: your Last.FM API key
  • LASTFM_SECRET: (optional) your Last.FM secret key (currently not used by the application)

None of the above environment variables are stored by the application and are read again on each run.


Why would this give good recommendations?

Beyond the idea of how Markov chains work, Spotkov using the Last.FM scrobber list as training is effective because the scrobble only takes place around 50% through the song, which means that songs you skipped or couldn't get through probably shouldn't be recommended, and since Last.FM doesn't store them Spotkov won't see it as options.

Also, there's a discounter for repeats of the same song that is designed to offer more variety. Occasionally (if you've listened to one song over and over for quite a bit of time) it will recommend a song twice. However, this isn't designed to happen very often.

How can I get it to give better recommendations?

Try to listen with purpose. If you throw playlists on shuffle and never skip, Spotkov will most likely give you more of the same (which you might want!). Even a few skips helps enormously with determining what songs you like together.

Built With

Share this project:

Updates