If the client part of the engine is loaded, you can use alxWaveLen(audioProfileName.fileName) to get it's length in MS.
This, however, does not work on dedicated servers, since the server does not try to parse the file and buffer it, only serve it to clients.
Is there a way to do do it, though?