To be understood in terms of duration, you mean the total playing time of music without a loop.
I don't think Libgdx APIs display this (the lowest common denominator APIs on the desktop, Android and Web are pretty low ...).
You can get this information from files that you upload to the system, though (for example, if they are wav or mp3 files, there must be an API to request their duration).
source share