Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mic-recorder-to-mp3

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mic-recorder-to-mp3

Record your microphone audio input and get an audio/mp3 ouput buffer/blob.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Microphone Recorder to Mp3

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

Install

Yarn

yarn add mic-recorder-to-mp3

NPM

npm install mic-recorder-to-mp3

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(function () {
  console.log('Start recording');
}, function () {
  alert('We could not make use of your microphone at the moment');
});


// Once you are done singing your best song, stop and get the mp3.
recorder
  .stop()
  .getMp3((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,
      lastModified: Date.now()
    });

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

  }, function (e) {
    alert('We could not retrieve your message');
    console.log(e);
  });

License

MIT

FAQs

Package last updated on 24 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc