Development/Summer of Code/2024/MusicBrainz: Difference between revisions

From MusicBrainz Wiki
Jump to navigationJump to search
(creating page based on 2023 page)
 
(→‎Ideas: Add the two ideas proposed during the last summit)
Line 8: Line 8:
== Ideas ==
== Ideas ==


=== Metadata recognition from cover art ===
=== [Name] ===
Proposed Mentors:


Proposed mentors: ''bitmap'', ''reosarevok'', ''yvanzo''<br>
Languages/skills:
Languages/skills: React.js, WebAssembly<br>
[https://community.metabrainz.org/c/musicbrainz Forum for discussion]<br>
Estimated Project Length: 175 hours (or 350 hours if machine learning)<br>
Difficulty: medium (or hard if machine learning)


MusicBrainz gathers metadata about [[Release|releases]] and their cover art through the [[Cover Art Archive]].
Estimated Project Length:
Very often editors have to type the data contained in the cover art images.
A drastic boost for them would be to programmatically parse these images to extract as much metadata as possible: free text, title, artist credit, label code, barcode, tracklist…


The optical character recognition engine [https://github.com/tesseract-ocr/tesseract Tesseract] can be used through either Naptha’s port in JavaScript [https://tesseract.projectnaptha.com/ Tesseract.js] or Knight’s build in WebAssembly [https://robertknight.github.io/tesseract-wasm/ tesseract-wasm].
Difficulty: [easy/medium]hard
In either case, the web user interface has to be written in React.js to allow a future integration to the website.


Tesseract has a lot of parameters that allow tuning it for specific usage, or focusing on some selected areas.
Expected outcomes:
However the main part of the project might be to turn its output into something useful.
The parsing/mapping can potentially be achieved through machine learning but that would likely double the project length.


=== MJML-based email renderer ===
[description]

Proposed mentors: ''bitmap'', ''reosarevok'', ''yvanzo''<br>
Languages/skills: React.js, Rust<br>
[https://community.metabrainz.org/c/musicbrainz Forum for discussion]<br>
Estimated Project Length: 175 hours<br>
Difficulty: medium

MusicBrainz Server can send emails to users in different occasions: email verification, edit notes, subscription edits, autoeditor election…
So far these emails are generated in text only format using [http://template-toolkit.org/ Template Toolkit] which has had its day.

A modern replacement can be [https://mjml.io/ MJML] through either the React.js wrapper [https://github.com/Faire/mjml-react mjml-react] or the Rust reimplementation [https://github.com/jdrouet/mrml MRML].
The first option would allow to reuse some components from the website frontend which has been mostly converted to React ([[jira:MBS-8609]]),
while the second option would be blazing fast (170× faster than the original Node.js implementation) but would require much work for components.

However a multipart email (text/HTML + text/plain) is still wanted here, while MJML is focused on generating HTML only.
So the plain text alternative part should probably be generated using a tool like [https://crates.io/crates/html2text html2text].

Revision as of 18:36, 29 November 2023

MusicBrainz is a community-maintained open source music encyclopaedia that collects music metadata and makes it available to the public. Try it out.

[*] Don't let the idea of writing Perl discourage you from checking out some of these projects! The MusicBrainz Server is written in readable, well-structured Perl, using the web application framework Catalyst. If you're comfortable in e.g. Python or Ruby web frameworks, then you'll probably be able to jump in and understand this codebase with only a little extra effort.

Getting Started

(see also: Getting started with GSoC)

Ideas

Metadata recognition from cover art

Proposed mentors: bitmap, reosarevok, yvanzo
Languages/skills: React.js, WebAssembly
Forum for discussion
Estimated Project Length: 175 hours (or 350 hours if machine learning)
Difficulty: medium (or hard if machine learning)

MusicBrainz gathers metadata about releases and their cover art through the Cover Art Archive. Very often editors have to type the data contained in the cover art images. A drastic boost for them would be to programmatically parse these images to extract as much metadata as possible: free text, title, artist credit, label code, barcode, tracklist…

The optical character recognition engine Tesseract can be used through either Naptha’s port in JavaScript Tesseract.js or Knight’s build in WebAssembly tesseract-wasm. In either case, the web user interface has to be written in React.js to allow a future integration to the website.

Tesseract has a lot of parameters that allow tuning it for specific usage, or focusing on some selected areas. However the main part of the project might be to turn its output into something useful. The parsing/mapping can potentially be achieved through machine learning but that would likely double the project length.

MJML-based email renderer

Proposed mentors: bitmap, reosarevok, yvanzo
Languages/skills: React.js, Rust
Forum for discussion
Estimated Project Length: 175 hours
Difficulty: medium

MusicBrainz Server can send emails to users in different occasions: email verification, edit notes, subscription edits, autoeditor election… So far these emails are generated in text only format using Template Toolkit which has had its day.

A modern replacement can be MJML through either the React.js wrapper mjml-react or the Rust reimplementation MRML. The first option would allow to reuse some components from the website frontend which has been mostly converted to React (jira:MBS-8609), while the second option would be blazing fast (170× faster than the original Node.js implementation) but would require much work for components.

However a multipart email (text/HTML + text/plain) is still wanted here, while MJML is focused on generating HTML only. So the plain text alternative part should probably be generated using a tool like html2text.