How to Call SPEEX Audio Decode/Encode in HTML5 / JavaScript (Without Flash)

一笑奈何 提交于 2019-11-30 07:06:10

I recently implemented a successful HTML5/VOIP client using the following JS port of Speex, truly awesome stuff:

https://github.com/jpemartins/speex.js

For now you'll need to either wait for MediaStreamRecorder or jump the gun like I did, and make use of this:

https://github.com/jwagener/recorder.js/

As for how you piece the whole lot together into a slick system, your call :)

Hope i've helped

I am working on a project called AudioRecorder that exactly fits your needs. You can find it here. https://github.com/dbieber/audiorecorder.

This builds upon the already mentioned emscripten compiled speex codec: jpemartins/speex.js.

If you already have the audio and just want to encode it, call Codec.encode(samples). You can also use AudioRecorder to record the audio -- there's an example on Github here: http://dbieber.github.io/audiorecorder/examples/recorder.html

The implementation currently assumes 1-channel audio and if you want two channel you can just encode or decode twice.

I had a similar requirement and ended up writing a Java applet that used JSpeex and called it from JS.

Feng Dihai

I have posted an answer on How can I play .spx file by html5 ?.

With speex.js, now I can play speech of word for my online dictionary project.

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