2

I have the following problem.

I record a wav file of my speech with my android device. I speak in: "1 2 3 4 5"

I can play the wav file on my pc.

I want to convert the wav file using the library javaFlacEncoder-0.2.3.jar (http://sourceforge.net/projects/javaflacencoder/)

Here is the code I used:

FLAC_FileEncoder ffe = new FLAC_FileEncoder();
ffe.encode(new File("test.wav"), new File("test.flac"));

The flac file is generated and I can open and hear it. The problem is, that the beginning of the audio is cut off somehow. It directly starts with "4 5" instead of "1 2 3 4 5".

So there is some audio from the beginning of the wav file missing.

When I convert the same wav file by using this service: http://audio.online-convert.com/convert-to-flac

I get a flac file back and it is converted correctly ( I hear "1 2 3 4 5", so the whole audio.)

Do you know where the problem could be? Or is there another easy to use library for wav2flac?

Greetings, Subby

Subby
  • 1,997
  • 4
  • 22
  • 38
  • Maybe it's better to convert it in mp3. Read the answer here: http://stackoverflow.com/questions/3641920/how-to-encode-a-wav-to-a-mp3-on-a-android-device/ – rosco Nov 12 '12 at 16:09
  • Maybe it is better, but useless for me. – Subby Nov 12 '12 at 19:00
  • 5
    javaFlacEncoder depends on javax.sound library, which is not supported in Android. How have you successfully encoded to a FLAC using it? – Calum Murray Mar 02 '13 at 12:47

0 Answers0