How to read the length of an mp3 file for mapping

Good morning! I need a little help, how can I read the audio length from an mp3 file? The file is on google drive, I need the exact length of the audio in seconds so that I can use it for mapping, any ideas? Thanks for the help.

The audio is generated dynamically in elevenlabs and then added to Google Drive, honestly I thought that the length would be in the data from elevenlabs but it isn’t :smiley:

Hello @Martino,

There’s a lot we don’t know about your entire workflow here, but you might check if it’s possible to include the length in the filename so you can use Make to extract it.

If the output is consistent in terms of codec used and quality settings then you might be able to figure it out from the file size.
Get one file, divide the size in bytes by the length in seconds to arrive at a number X.
Find another file, divide the number of bytes by X and see if that result is roughly the number of seconds it is in length.

1 Like

Possible similar question was asked here Duration of a mp3

2 Likes