Вопрос

I wanted to know if there any java api that could identify the type of format the audio file is.

I know one way is by extension,but even when the extension is wrong, I should be able to find the type of audio file

Это было полезно?

Решение

You can try to take a look at the Java Sound API, where you have the AudioSystem static methods:

AudioFileFormat format = AudioSystem.getAudioFileFormat(new File("music.mp3"));
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top