Skip to content

Display translated lyrics of the currently playing Spotify track in real time.

Notifications You must be signed in to change notification settings

atahanuz/spotify-translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

Spotify Translator

Display translated lyrics of the currently playing Spotify track in real-time, extremely simple to use! It is 2024 but for some reason Spotify still doesn't provide a native solution to translate lyrics of non-English songs, so I had to come up with this solution.

Installation

To get started, install the required Python packages:

pip3 install syrics
pip install deep-translator
pip install sv-ttk

Now download app.py. You only need to edit this part in the code (the 12th line):

sp = Spotify("your_sp_dc")

Follow the instructions here to find your Spotify sp_dc key: Finding sp_dc

Usage

Run the app.py with this command, that's it!

python app.py

You should see the GUI application, which will stay open until closed and will show translated lyrics of each song in real-time. Yes it is as simple as running a single .py file, weren't you supposed to clone 5 Github repos and launch 3 Docker containers? 😂

Spotify's Native Lyrics Display

Native lyrics display of Spotify

Translated Lyrics Display on the App

The app with translation

The program uses the Google Translate API to translate lyrics from any language to English, which often takes 2-3 seconds. It builds a cache of lyrics of the last played 1000 songs to prevent translating the same songs repeatedly. You can change the cache size to any value (or 0 to disable it altogether). The cache will be written/read to the lyrics_cache.pkl file.

Video Demo: https://youtu.be/OBQi-sNb3Ss

Thanks

Thanks to @akashrchandran for his Spotify Lyrics Api which made my app possible: https://github.com/akashrchandran/syrics
And thanks to Melisa @melisahingl for her wonderful Russian music playlist :)

Contact

You can write to me at atahanuz23@gmail.com for anything at any time.
However if it is about this program, it will be better if you raise an issue in the repo or submit a PR so everyone can see and contribute to the discussion.

About

Display translated lyrics of the currently playing Spotify track in real time.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages