-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add lyrics translation using Microsoft Bing API #1939
Conversation
By subscribing to Microsoft Translator API, one can now activate the translation of lyrics from one set of source langages to a target langage. Translations are appended to each original sentence using ‘/‘ as separator.
@@ -113,3 +121,19 @@ After that, the lyrics plugin will fall back on other declared data sources. | |||
|
|||
.. _pip: http://www.pip-installer.org/ | |||
.. _BeautifulSoup: http://www.crummy.com/software/BeautifulSoup/bs4/doc/ | |||
|
|||
Activate on-the-fly translation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Matching our usual style, this should probably be in Title Case: "Activate On-the-Fly Translation"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
This is pretty nifty! I'm all for it—it's a fairly "niche" feature, but that's true of a great many of beets' features. 😃 |
Bing API has a limit of 2M chars/month. It’s common to have repeating sentences in lyrics so to reduce number of chars sent per song, store sentences in a set and send it, instead of sending the whole lyrics.
👻 Good to merge? |
Looks great! Go for it! |
🌐 Adiou,
Dunno if it should be merged or if I should maintain it separately in my fork : scratching my own hitch here, and the result of translation can be suboptimal.
set
to reduce size of text to translate and thus translate more songs within the fixed API limit of 2,000,000 chars/month[...]