Recording merge bot

I have been working on a first-pass at a “merge recording” bot and I’d like to see if anyone has any thoughts on whether I should continue pursuing this.

I built a workflow that gathers all the recordings for a given artist from my MB mirror. It then creates a list of merge candidate groups from those recordings. In order to be eligible for a merge, two (or more) recordings must have:

  1. Completely matching Artist Credits
  2. Titles that match on everything except for differing apostrophes
  3. No disagreement in disambiguation
  4. Only one ISRC which is present on all recordings
  5. No disjunctive AcoustIDs
  6. Track lengths within 2s of each other

An extension in an isolated browser can then

  1. Pull a list of eligible merges from the prepared reports
  2. Open a browser tab with a merge submission with the appropriate recordings added
  3. Generate a report similar to one I’m using elsewhere (e.g. Sign in - MetaBrainz Foundation)
  4. Verify that the recordings should actually be merged
  5. Submit the merge
  6. Wait for the merge to submit
  7. Stop if a merge does not submit or is deemed invalid
  8. Open the next eligible merge if the merge does complete

The intent of this bot would be to clean up the really easy stuff. There are lots of other cases where a human might decide a merge is appropriate but if I’m going to go ahead with this, it should only submit merges where no reasonable human would disagree. Initially, I would cap the number of possible merges to submit per day to something small like 5 or 10 so that I can verify there are no failure patterns in the process.

I’d be interested to hear if anyone disagrees with pursuing this or can recognize some gaps in my thought process. Any input is greatly appreciated.

1 Like

It’s not enough, release type comparison is missing.
Ah, I didn’t notice the ISRC thing, it could be OK
And no, please don’t do this.
Even with human editors, a lot of recordings are wrongly merged.
There’s no urgency in merging recordings.
Reconciliating recordings is something we editors can do if we feel it’s interesting.

4 Likes

Can you give an example of a release type problem? Are you thinking, e.g., a recording from a DJ mix or compilation getting merged with a recording from a single or album release? That’s something I currently check visually and in most of the cases I see, disambiguation and length already serve as a blocker for those kinds of merges, but there’s no reason in principle I couldn’t add a release type comparison as well.

For what it’s worth, I do already do lots of recording merges. To me, it is necessary cleanup but a waste of my time for probably 70% of the merges I submit.

You say “even with human editors, a lot of recordings are wrongly merged” and from my perspective, that is part of the problem: for some kinds of cases, programmatic responses are more reliable than humans. I think the goal is to make sure we correctly identify which cases are which.

DJ mixed recordings can have very similar lengths to original and there is no guarantee of a disambiguation.

Your list seems to lack video.

2 Likes

Video is a good point, thank you.

On DJ mixed recordings, I agree that lengths can be similar and the recording may lack disambiguation, but I think that can be accounted for by adding a rule to exclude certain release types (e.g. DJ Mix, Broadcast, Live, etc.).

Perhaps you folks disagree but I think there must be some set of overlapping conditions where no reasonable person would disagree with a merge, no?

I initially mentioned release group types, because live versions often have same length (but then I saw that you will not merge recordings without ISRC, so maybe OK).

DJ-mix is a good point too:

  • DJ-mixes often share ISRC.
  • DJ-mixes are not always identified in MB.

Automated recording merges were discussed tangentially before:

I think it’s a very bad idea. You should not assume editors will add disambiguations. You shouldn’t assume editors will use the DJ-mix release group type when needed, and this isn’t even close to why recordings with the same metadata can’t be merged.

If you aren’t familiar with the recording artist, you have no idea how often they re-record songs, whether they are DJs/trackmakers who frequently generate new mixes, etc.

In the case of legacy video game music formats, you have no idea what the audio sounds like, if recorded the video game being played on the real console, if they synthesized/emulated audio that sounds different, etc.

In the case of recorded music, editors rarely add comprehensive performer relationships, which are often unavailable without buying a physical release with a booklet, and performers may have been swapped out without the addition of ETI.

In the case of composers without ISRCs, you have no idea whether tracks with the same title and length are totally different compositions because the recording merge bot won’t know what the release titles mean.

Even more so than in Edit #144119718, I think people shouldn’t vote/edit things they are not familiar with without performing due diligence - and in the case of merging recordings, that involves acquiring the audio involved.

6 Likes

If you’re looking for low-hanging fruit to throw an LLM at, I’d start with https://tickets.metabrainz.org/browse/MBS-14116?focusedId=82830&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-82830

1 Like

Just wanting to make sure I understand what your big picture view is here, you’re suggesting that recordings should only be merged if a person has listened to both recordings in their actual releases?

I would suggest only running the bot on the music of artists you are somewhat familiar with and can see a “mess” that should be cleaned up, yes.

You shouldn’t be going around submitting destructive edits on music you aren’t familiar with because even if you’ve defined a set of criteria, all those values are unreliable because the average editor generating duplicate recordings is going to be unreliable.

2 Likes

I appreciate your follow-up.

Perhaps it would have helped if I said the bot would only run on artists that I’m already subscribed to, but that is admittedly quite a large list. It’s also possible that the releases I work on the most (digital media, official releases, from metadata across multiple streaming platforms) don’t share the same degree of variation that might be seen in other artists and so I’m simply unable to anticipate the worst case scenarios.

What I’m trying to get to is still the same thing I said earlier: surely there must be some combination of conditions that no reasonable human would vote against. Like suppose same credits, same isrc, same length, same title, no disambiguation, official release, digital media, no secondary release type, releases have verified barcodes and active links, recording is not a video, just one is from the single release and another from an album release: these are all things that can be programatically checked. At a certain point, the kind of confusion people seem to be positing is at such a level that I doubt whether even a human could suss it out.

1 Like

The combination of conditions only works if the data is reliable. Here’s 2 examples where anyone could see “same credits, same isrc, same length, same title” and same release group types:

There would be no disambiguation comments unless someone who listened to both releases decided to add one.

(And you run into the problem where you should ignore all MB Recordings with a matching ISRC since you’ll have to manually pick the correct recording based on criteria the bot will not know.)

I also assume that when you say “no secondary release type” you don’t actually mean that, because it’s compilation releases that generate the most duplicate recordings. (But in my example, you also can’t rely on same release group type either.)

If you submit a large merge edit, you should expected skeptical voters and be prepared to defend it. If you only stick to music you’re actually familiar with, that shouldn’t pose you problems.

4 Likes

These are all examples of how recordings can look the same, but which stage involves listening to the tracks on different releases and comparing the audio to confirm that they sound the same? Because recordings represent audio, not data like title, artist, length, ISRC, etc. Other editors have already given examples of how that data can (mistakenly) vary between releases, making it unreliable.

5 Likes

“The elephant in the room” in his thread and others like it that deal with concerns about automation are largely about “who is going to clean up the mess” that may be generated. I believe the intent by the OP is sincere (I have looked at their metrics) and I think they will take care with their automation. Still others will have to take time to monitor what merges are going on and a Bot can generate a lot of work for others. Even worse is the Bot let loose by a less thoughtful person. There is a human tendency that more is better (faster, easier) and sometimes in our quest to achieve “more” we lose sight of the effect we place on others. Maybe my perspective is being influenced by the last number of “days” I have spent cleaning up after an unregistered AI/Bot generated a mess, the editor has not responded and is not helping clean up the mess.

7 Likes

I have the same concern. Here is one more example of the mess that can ensue: almost 500 duplicate works created by an editor who thought they were being helpful.

4 Likes

I wish there was the opposite of this in hopes of improving the voting situation.

A kind of report or dashboard listing potentially bad and good edits based on various criteria and plausibility.

  • Lengths are off by 15 seconds or more? → Potentially bad merge or incorrectly linked recording. (Not just on recording merges but also medium adds)
  • Medium formats mismatch on release merge? → Potentially bad merge or data.
  • Edits dropping ETI? → Potentially blindly selected update options in release editor.
  • Edits adding mix of formats like CD to digital release or vice versa?
  • Too many or implausible cover art types?
  • …

Possibly an LLM could help finding more criteria by looking at past votes (and maybe there are more tickets).

Potentially good edits can be found by comparing changes to style guide compliance.

There is only so much you can do with edit search alone. Subscriptions don’t cover nearly enough and I have the impression those who use edit search for voting are the minority.

ArtistsWithNoSubscribers

  • Total artists found: 745264
  • Generated on 2026-10-11 00:22 UTC

5 Likes

I really appreciate this response. If I could contrast my situation with some of what others are most afraid of: I’m here asking for insight, about artists I already try to maintain, have explained how it would work, and proposed to limit the volume of edits until we could be confident that there weren’t new problems that arose from it.

1 Like

This is the same question I was asking of yindesu: are you saying that the only way one should submit a merge (or vote yes on one) is if you have listened to the actual recordings from both releases? If that is genuinely the standard that is expected, that effectively means the end of recording merges for me, though kudos to everyone else who has that patience.

edit: I think that view also has other implications. It suggests one should not re-use existing recordings from the site, and Harmony shouldn’t merge releases across platforms. And arguably even having listened to them is not sufficient: one should have copies of them so that they can be compared spectrally or byte for byte.

2 Likes

Here’s another example of why you’d need to listen to the releases:

They are different recordings (edits) and would fail all metadata checks (again, disambiguation comments can only be added by people who cared).

In this example, if you don’t own all the dozens of releases involved in Track "9bd6606c-5deb-4993-9a28-7e61acf7935c" | AcoustID, then I would claim you are not able to enter any recording merges.

The responsible thing to do when seeing recordings with matching metadata (and lack of disambiguation comments) outside of the artist’s single/album release groups is to determine if a missing disambiguation comment needs to be introduced.