1.1.2 • Published 4 years ago

tacus v1.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

Tacus

npm gzip size Build Status install size dep downloads npm.io

Features

  • light. No third party dependencies.
  • Easy. Use only 5 API to do every thing about recording and playing.

Instruction

Tacus is a simple library to recorder audio in browser.

Quick Start

Tacus is an simple library for web recording. You only have to learn six methods: open, start, pause, resume, stop, clear.

Installation

Use npm

npm i tacus

import it as ES6 module

import { Tacus } from 'tacus'

Use script

Local

<script src="/path/to/tacus.js"></script>

You can download the latest version from here.

CDN

<script src="https://cdn.jsdelivr.net/npm/tacus@0.1.1/dist/tacus.min.js"></script>

Usage

let tacus = new Tacus();

tacus.start();

tacus.stop();

See examples for more details.

API

constructor(config)

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()

Start recording or playing.

example:

tacus.start();

stop()

Stop recording or playing.

example:

tacus.stop()

pause()

Pause recording or playing.

example:

tacus.pause();

resume()

Resume recording or playing.

example:

tacus.resume();

download

download audio.

example:

tacus.download();

exportWAV

export WAV as array buffer

example:

tacus.exportWAV();
1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago