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

前端 未结 4 2065
無奈伤痛
無奈伤痛 2020-12-30 09:27

I\'m working on a project that requires audio data to be streamed via HTTP to/from server.

We need to compress the audio data using SPEEX.

In Flash, we can u

4条回答
  •  旧时难觅i
    2020-12-30 10:03

    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.

提交回复
热议问题