以下是我使用jave 1.0.2 jar将mp3文件转换为wave的代码
File source = new File("D://Test1.mp3");
File target = new File("F://Test.wav");
AudioAttributes audio = new AudioAttributes();
audio.setCodec("pcm_s32be");
audio.setChannels(1);
audio.setSamplingRate(8000);
EncodingAttributes attrs = new EncodingAttributes();
attrs.setFormat("wav");
attrs.setAudioAttributes(audio);
Encoder encoder = new Encoder();
encoder.encode(source, target, attrs);