Get time of sound

Hello, is it possible to return the length of a sound? Like, I want to create a “playlist” which randomly plays music from a table, and after one ends, the next one shall blend in(also random), but I dont know how I should go about that?

use SoundDuration(“soundpath”) to get duration of your sound file in seconds but be warned that it may not work with anything apart .wav files.