How to encode Recorded voice to ogg vorbis?

后端 未结 2 1850
抹茶落季
抹茶落季 2020-12-15 01:17

I have recorded voice with android AudioRecord and I would like to convert it to ogg vorbis as it is patent free. I have try vorbis-java beta, but it seem not work or I make

2条回答
  •  攒了一身酷
    2020-12-15 01:51

    You seem to write raw audio data into a file instead of wav format. Wav format does have headers, not just audio data.

    Note: Don't use vorbis-java, but compile from libogg and libvorbis sources at http://www.xiph.org/downloads/

    Use android NDK to compile them for embedding in your apk file.

    Then you can call the native code from your app to encode the audio data.

提交回复
热议问题