0

Using eyed3, how can i get or set lyrics of a song ?

I tried this

audiofile.tag.lyrics.get()

But the method is asking for a parameter, and i have no idea what it should be.

The documentation at this link is unclear (i guess its not complete yet)

Also, if you know about any better library for manipulating mp3 tags, please suggest that too.

Rupam
  • 1,502
  • 13
  • 23

1 Answers1

1

According to the source code -

@property
def lyrics(self):
    return self._lyrics

Seems like lyrics is a property of the class You can get them directly using the name.

Example -

Getting -

print(audiofile.tag.lyrics)

Also, tag.lyrics is of type LyricAccessor which is basically an iterator (as its base class is AccessorBase , which supports iteration) . Then for accessing the lyrics you will need to use something like -

for lyric in audiofile.tag.lyrics:
    print(lyric)

I do not see a setter method in the class, so it may not be possible to set it.

Anand S Kumar
  • 88,551
  • 18
  • 188
  • 176