Microphone Recorder to Mp3/Wav
Record your microphone audio input and get an audio/mp3
or audio/wav
file in the end.
Written in TypeScript
Install
npm
npm install mic-recorder
Development
- Watch for changes:
npm run watch
- Regular build:
npm run build
How to use
const MicRecorder = default; // or// import MicRecorder from 'mic-recorder'; // New instanceconst recorder = bitRate: 128 encoder: 'mp3' // default is mp3, can be wav as well sampleRate: 44100 // default is 44100, it can also be set to 16000 and 8000.; // Start recording. Browser will request permission to use your microphone.recorderstart; // Once you are done singing your best song, stop and get the mp3.recorder ;
Lamejs Notice
This library uses lamejs as a direct dependency. We build our releases with lamejs built-in, so you don't need to add another dependency.
Thanks to @zhuker for writing the lamejs library.
License
MIT