This is a python script to show synced lyrics of your current playing song in Spotify at terminal.
- Show synced lyrics line by line
- No matter what device Spotify are connecting
This repo requires python3
.
Related pip packages: spotipy
lrc_kit
beautifulsoup4
requests
xmltodict
psutil
unidecode
.
pip3 install -r requirements.txt
This feature needs Spotify authorization_code
to get your current playback status. The scope is user-read-playback-state
. Detailed information about this can be found at Spotify for Developer.
- Create an application at Developer Dashboard.
- Put the
Client ID
andClient Secret
of the app toconfig.ini
.
- For example:
[client]
name = taytay
client_id= 1234567890123456789
client_secret = abcdefghijklmnopqrst
[oauth]
scope = user-read-playback-state
redirect_uri = http://localhost/callback/
Clone this repository:
git clone git@github.com:TimoLin/SpotifyLyrics.git
Run in your terminal after you play a song in Spotify on any device:
python3 SpotifyLyrics.py
The lyrics source can be changed by changing this line:
lyricsProvider = [lrc_kit.QQProvider]
Available providers can be found at reteps/lrc_kit/provider.py as follows and just select one of them:
MINIMAL_PROVIDERS = [
SogeciProvider,
Music163Provider,
QQProvider,
KugeciProvider,
SyairProvider, # Very slow, but contains most sources
]
PROVIDERS = MINIMAL_PROVIDERS + [
RentanaAdvisorProvider,
MegalobizProvider
]
EXTENDED_PROVIDERS = PROVIDERS + [
MooflacProvider, # Uses an email/password
Flac123Provider # Uses an email/password
]
ALL_PROVIDERS = EXTENDED_PROVIDERS + [
LyricFindProvider, # Requires a valid API Key
KugouProvider, # Provides little english lyrics
XiamiProvider # Was taken offline 2/4.
]
Thanks to reteps,
lrc_kit
has implemented many lyrics source providers method.
A light weight Python library for the Spotify Web API. Docs of spotipy
Thanks to fr31, the lyrics.py and services.py are copied from this project.
- Add more lyrics search api like
Neatease
,Xiami
- Re-consider synced lyrics implementation to improve performence
- Save lyrics to local drive and first check local lyrics
- Exception handling