# The audio library is just_audio
final player = AudioPlayer();
var duration = await player.setUrl('audio_file.mp3');
AudioPlayer audioPlayer = AudioPlayer();
audioPlayer.onDurationChanged.listen((Duration duration) {
print('max duration: ${duration.inSeconds}');
});