- light. No third party dependencies.
- Easy. Use only 5 API to do every thing about recording and playing.
Tacus is a simple library to recorder audio in browser.
Tacus is an simple library for web recording. You only have to learn six methods: open, start, pause, resume, stop, clear.
npm i tacus
import it as ES6 module
import { Tacus } from 'tacus'
<script src="/path/to/tacus.js"></script>
You can download the latest version from here.
<script src="https://cdn.jsdelivr.net/npm/tacus@0.1.1/dist/tacus.min.js"></script>
let tacus = new Tacus();
tacus.start();
tacus.stop();
See examples for more details.
Initialize a Tacus instance.
config
parameter | description | type |
---|---|---|
bufferSize | buffer size | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384 |
sampleRate | sample rate | 8000 | 16000 | 22050 | 24000 | 44100 | 48000 |
example:
const tacus = new Tacus();
Start recording or playing.
example:
tacus.start();
Stop recording or playing.
example:
tacus.stop()
Pause recording or playing.
example:
tacus.pause();
Resume recording or playing.
example:
tacus.resume();
download audio.
example:
tacus.download();
export WAV as array buffer
example:
tacus.exportWAV();