Skip to content
/ tacus Public

psittacus is a simple library to recoder audio in browser

License

Notifications You must be signed in to change notification settings

qiurenbo/tacus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tacus

npm Build Status install size dep downloads

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

About

psittacus is a simple library to recoder audio in browser

Resources

License

Stars

Watchers

Forks

Packages

No packages published