I need to extract the audio duration value of the MP3, WAV, MIDI, OGG,FLAC, ACC audio types. For MP3 I was able to get the duration with Apache Tika with below code. But it does not give audio duration for WAV, MIDI, OGG,FLAC, ACC files with java. How to get the duration value with Apache Tika for other audio types. My metadata parser code is as below
Parser parser = new AutoDetectParser();
ContentHandler handler = new BodyContentHandler();
Metadata metadata = new Metadata();
ParseContext context = new ParseContext();
parser.parse(content.getContentStream(), handler, metadata, context);
String duration = metadata.get("metadata_name_for_duration");