Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.
/ microphone-js Public archive

Zero dependency library - Browser's microphone to WAV

Notifications You must be signed in to change notification settings

gmpetrov/microphone-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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


About

Zero dependency library - Browser's microphone to WAV

Resources

Stars

Watchers

Forks

Packages

No packages published