Skip to content
JavaScript CSS HTML
Branch: gh-pages
Clone or download
Latest commit b02f12b Sep 25, 2015
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib setting up for publishing Mar 23, 2015
.gitignore reorg for gh page deployment Mar 12, 2015
.jshintrc basic working resampler Mar 12, 2015 updated readme, version bump for npm and cleanup Mar 23, 2015
bower.json added bower support Sep 25, 2015
bundle.js fixed css issues Jul 2, 2015
index.html updated title Jul 2, 2015
index.js fixed css issues Jul 2, 2015
package.json updated readme, version bump for npm and cleanup Mar 23, 2015
style.css added spinner Mar 23, 2015


npm version

Simple WebAudio based resampling library.

Runs on all modern browsers which support WebAudio.


npm install audio-resampler


resampler = require('audio-resampler');
resampler(input, targetSampleRate, oncomplete);

input : Input audio file. This can either be a URL, a File object, or an AudioBuffer.

targetSampleRate : The target sample rate after the re-sampling process. This number is limted based on the browser implementation (usually >=3000, <=192000)

oncomplete: Callback when the resampling process is completed. The argument to this callback is an Object which supports the following methods:

getAudioBuffer : Returns the resampler AudioBuffer

getFile : Returns a ObjectURL of a WAV file created from the resampled Audio.

Example Usage

resampler = require('audio-resampler');
var URL = ""
resampler(URL, 192000, function(event){
		var a = document.createElement("a");
		document.body.appendChild(a); = "resampled.wav"; = "display: none";
		a.href = fileEvent;;


To test this repository, you can run a local server using the npm start command which serves a simple drag-and-drop interface based webpage to resampler audio files.

You can’t perform that action at this time.