audiorecorder icon indicating copy to clipboard operation
audiorecorder copied to clipboard

Downsample the audio

Open tehmaestro opened this issue 10 years ago • 2 comments

Hey there. This is really an awesome tool. But one question, how can I downsample the audio file? I need to record from the microphone input and send a 16 bit, 8000 Hz .spx extension file to the server. How can I do this? Where do I need to set the sample rate?

Thanks.

tehmaestro avatar Dec 14 '14 09:12 tehmaestro

Hey, I realize you posted that almost a year ago. That said, if you were able to resolve your issue (whether with this project or in some other way) do you mind sharing how here?

dbieber avatar Nov 28 '15 22:11 dbieber

I've since switched to a solution based on recorder.js refactored to match the upcoming MediaRecorder API, but want to mention some quick (ie: pre-existing work) to implement resampling. Ordering by perceived quality, descending in speed.

  1. emscripten port of libspeexdsp (opus.js-sample already has this)
  2. "magic kernel" based resampler I found in some project
  3. XAudioJS has a resampler. Quality isn't too good though.
  4. naive resampler (this produces really bad quality, but it's fast)

jhiswin avatar Nov 29 '15 00:11 jhiswin