Search code examples
spotifylibspotify

Get full song audio data from libspotify


I'm using pyspotify, a python wrapper for libspotify to play songs from Spotify. I'd like to do some audio analysis on the whole song before starting playback, is there a way to get the audio from the whole song at once?

The music_delivery callback is invoked throughout the playback, maybe there's a way for it to be invoked immediately when data is available from server?


Solution

  • No, this isn't possible. However, you could simply queue up the audio data yourself instead of delivering it to the audio driver. After a few minutes, you'll have everything you need.