Porting to picard.webservice

I think ChatGPT got a bit confused, this is as close as I could get to what you are looking for:

from picard.metadata import register_track_metadata_processor
from syncedlyrics import search

def add_lyrics(tagger, metadata, track, release):
        lyrics = search(f"{metadata['title']} {metadata['artist']}") 
        if lyrics:
            metadata['lyrics'] = lyrics

register_track_metadata_processor(add_lyrics)

I took a peek at syncedlyrics and the search function returns a string in LRC format.

The problem is that I don’t think Picard maps the synced-lyrics tag. So when you do metadata['syncedlyrics'], you just create a custom tag (unless I’m wrong).

There is, however, a lyrics tag in the mapping. With the code above you would get the lyrics with some timestamps in the middle, so it’s definitely not what you are looking for.

BTW, I assumed you have already installed syncedlyrics with pip since you included it in the code.

I’ll look at it again later when I have more time.

P.S. I found this post from a few years ago where the same thing was asked. It’s linked to this issue.