Separates songs in a Spotify playlist by language.
Look up requirements.txt and run pip install -r requirements.txt
.
Alternatively:
pip install langdetect
pip install iso639
pip install lyricsgenius
pip install spotipy
Run this with your credentials in your environment
export SPOTIPY_CLIENT_ID='your_spotify_client_id'
export SPOTIPY_CLIENT_SECRET='your_spotify_client_secret'
export SPOTIPY_REDIRECT_URI='your_genius_redirect_uri'
export GENIUS_ACCESS_TOKEN='your_genius_access_token'
Two windows will request the Spotify URI and if user wants to get language from the song lyrics.
New playlists should show sorted by language.
Note: Although looking at the song name or album can be enough, because some songs were sung in another language with English titles, I decided to add language detection of their lyrics.