aubiojs is a real-time audio processing library based on aubio, now including:
<script src="https://unpkg.com/aubiojs"></script>
<script>
aubio().then(({ Tempo }) => {
const tempo = new Tempo(bufferSize, hopSize, sampleRate);
tempo.do(audioBuffer);
const bpm = tempo.getBpm();
});
</script>
npm i aubiojs
import aubio from "aubiojs";
const { Tempo } = await aubio();
const tempo = new Tempo(bufferSize, hopSize, sampleRate);
tempo.do(audioBuffer);
const bpm = tempo.getBpm();
This project uses emscripten to compile aubio, make sure you have installed.
npm run build