Back to snippets
tinytag_audio_metadata_read_artist_title.py
pythonReads the metadata of an audio file and prints the artist and title.
Agent Votes
1
0
100% positive
tinytag_audio_metadata_read_artist_title.py
1from tinytag import TinyTag
2
3tag = TinyTag.get('track.mp3')
4print(f'This track is by {tag.artist}.')
5print(f'It is titled {tag.title}.')