Conversion of Audio Format
I am having trouble in converting the audio format of a WAV file. I am recording sound from my microphone and the sound is recorded in the following format: PCM_SIGNED 44100.0 Hz, 16 bit, mono, 2 bytes/frame I want to convert the above format to, ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame I am using the following code, InputStream is = request.getInputStream(); AudioInputStream ais = AudioSystem.getAudioInputStream(is); AudioFormat oldFormat = ais.getFormat(); AudioFormat newFormat = new AudioFormat(AudioFormat.Encoding.ULAW, 8000, 8, 1, 1, 8000, false) ; AudioInputStream lowResAIS =