How to encode Recorded voice to ogg vorbis?

陌路散爱 提交于 2019-11-29 00:13:05

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

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!