microphone-js
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published
logo

A tiny library for converting browser's audio to WAV/PCM


zero dependency
uses browser's api MediaDevices.getUserMedia()

usage

npm install microphone-js
import { Microphone } from 'microphone-js'
 
const mic = Microphone();
// const mic = Microphone({ isMono: true, sampleRate: 16000 }); if you yant mono 16KHz, default is stereo 44kHz
 
mic.start();
 
mic.stop();
 
// continue recording
mic.start();
 
const blob = mic.getBlob();
 
mic.download();
 
// reset recording buffer
mic.reset();    

Resources


Readme

Keywords

none

Package Sidebar

Install

npm i microphone-js

Weekly Downloads

17

Version

0.1.1

License

none

Unpacked Size

56.1 kB

Total Files

12

Last publish

Collaborators

  • gmpetrov