First of all you will need to figure out how many frames per second (sample rate) your audio has been generated and what the proper sample resolution (bit rate), knowing these values you can develop an algorithm to encode files ". RAW" for any other type, as long as you know the steps needed to encode for the audio extension of interest, this is not a simple task, there must be some ready-made class that performs encoding but never looked for anything like this in Java, the algorithm for encoding raw files to wav is not very complex...
The simplest thing to do is to use some conversion software that accepts input per command line to perform the conversion, I recommend the Sox
Here’s an example of how to use:
sox -r 8000 –bits 16 –encoding signed-integer –endian big -t raw original.RAW convertido.wav
This example performs conversion of a 16-bit recorded RAW file and sampled at 8000 hertz to the extension ". wav"
It’s your own app that records audio?
– André Ribeiro
Welcome to SOPT! What have you tried? take a look at this link to improve the quality of your question: [Ask]
– Marciano.Andrade