dbieber / audiorecorder

AudioRecorder: a cross platform javascript utility for recording and playing audio in all major browsers
33 stars 14 forks source link

Downsample the audio #8

Open tehmaestro opened 9 years ago

tehmaestro commented 9 years ago

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.

dbieber commented 8 years ago

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?

jhiswin commented 8 years ago

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)