Skip to content
Microphone Recorder to mp3
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist chore(package.json): publish new version to npm Mar 20, 2019
src Bug fix for Firefox OverconstrainedError Nov 20, 2018
.ackrc Add .ackrc Jun 27, 2017
.gitignore use rollup as bundler Jun 24, 2017
.npmignore use rollup as bundler Jun 24, 2017
LICENSE Change License Jun 27, 2017 docs( update version on cdn examples Mar 20, 2019
rollup.config.js Use minified version, improve readme and bump to 1.2.1 Jun 26, 2017
yarn.lock Remove webrtc-adapter and improve comments Jul 6, 2017

Microphone Recorder to Mp3

Record your microphone audio input and get an audio/mp3 file in the end.



yarn add mic-recorder-to-mp3


npm install mic-recorder-to-mp3

CDN Usage

You can add via CDN using the address: You can find the minified version in the same address, ex:

About the version in URL: Change the URL version to any of our releases, or use to automatically use the latest version.


  • Watch for changes:
npm run watch
  • Regular build:
npm run build

How to use

const MicRecorder = require('mic-recorder-to-mp3');

// New instance
const recorder = new MicRecorder({
  bitRate: 128

// Start recording. Browser will request permission to use your microphone.
recorder.start().then(() => {
  // something else
}).catch((e) => {

// Once you are done singing your best song, stop and get the mp3.
.getMp3().then(([buffer, blob]) => {
  // do what ever you want with buffer and blob
  // Example: Create a mp3 file and play
  const file = new File(buffer, 'me-at-thevoice.mp3', {
    type: blob.type,

  const player = new Audio(URL.createObjectURL(file));;

}).catch((e) => {
  alert('We could not retrieve your message');

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.



You can’t perform that action at this time.