title: converting audio file in java
body: <p>I have used below code for converting audio file to wav format with 8000 Hz, 16 bit and mono channel
  using <a href="http://www.sauronsoftware.it/projects/jave/manual.php" rel="nofollow">JAVE</a></p>
  
  <pre><code>File source = new File("file.mp3");
       File target = new File("soundfile\\file2.wav");
       AudioAttributes audio = new AudioAttributes();
       audio.setCodec("pcm_s16le");
       audio.setBitRate(new Integer(16));
       audio.setChannels(new Integer(1));
       audio.setSamplingRate(new Integer(8000));
       EncodingAttributes attrs = new EncodingAttributes();
       attrs.setFormat("wav");
       attrs.setAudioAttributes(audio);
       Encoder encoder = new Encoder();
       try {
          encoder.encode(source, target, attrs);
          System.out.println("Successfully created"); 
      } catch (IllegalArgumentException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      } catch (InputFormatException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      } catch (EncoderException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  </code></pre>
  
  <p>It converting but that file is not play in media player. can any one help me to detect the problem in my code.</p>