How to encode Recorded voice to ogg vorbis?

后端 未结 2 1849
抹茶落季
抹茶落季 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条回答
  • I think i read this question a few weeks ago and was also super frustrated. I ended up writing the needed ndk wrapper to use Xiph.org's stuff. The only catch is that in order to make it run well, I had to enable floating point instructions. Emulators don't have floating point, so it'll crash the emulator. Run it on pretty much any phone, though, and you'll be good to go. It's designed to emulate a FileInputStream and FileOutputStream for interfacing with the vorbis files.

    https://github.com/nwertzberger/libogg-vorbis-android

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题