Get the duration (seconds) of a sound file?

Hi all,

Is there a way for GDevelop to tell how long an MP3 file is in (milli)seconds?

I’m making a dialogue-based game with full voice-over using the DialogueTree extension. The idea is to adjust the speed of the typewriter effect for the dialogue so that the text would finish typing at the same time as the corresponding line of recorded dialogue stops playing. However, without a way to tell how long a sound file is, I’d have to manually record the duration for each MP3 file I use in the game.

Any tips would be appreciated!

I would play each voice in the game start at volume 0 and start a timer, then pause the timer when the audio is not playing (if gdevelop have this detection, because idk) then I would save the timer seconds in a variable to use it later. But, I think this would be more boring than manually setting the text time.

Thanks for the reply! I was considering doing that, but yeah, it might be tedious to implement. For now, I’m entering the times manually but I might go back to this option when the scope increases…