![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
mic-recorder-to-mp3-fixed
Advanced tools
Record your microphone audio input and get an audio/mp3 ouput buffer/blob.
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
You can add via CDN using the address: https://unpkg.com/mic-recorder-to-mp3@2.2.1. You can find the minified version in the same address, ex: https://unpkg.com/mic-recorder-to-mp3@2.2.1/dist/index.min.js
About the version in URL: Change the URL version to any of our releases, or use https://unpkg.com/mic-recorder-to-mp3 to automatically use the latest version.
npm run watch
npm run build
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) => {
console.error(e);
});
// Once you are done singing your best song, stop and get the mp3.
recorder
.stop()
.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,
lastModified: Date.now()
});
const player = new Audio(URL.createObjectURL(file));
player.play();
}).catch((e) => {
alert('We could not retrieve your message');
console.log(e);
});
Check the samples folder for more examples.
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.
MIT
FAQs
Record your microphone audio input and get an audio/mp3 ouput buffer/blob.
We found that mic-recorder-to-mp3-fixed demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.