Observed since 20 Oct, 19:02 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
24-audio
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.
This project is supplementary to the mic-recorder-to-mp3 .
(Fix compatibility issues with safri browsers.)
npm install 24-audio
const MicRecorder = require('24-audio');
// 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);
});
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.
This project is supplementary to the mic-recorder-to-mp3
MIT
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
lamejsEnvironment{
"local_name": "lamejs",
"alias": false,
"peer_metadata": null
} | ^1.2.0 | runtime |
babel-coreEnvironment{
"local_name": "babel-core",
"alias": false,
"peer_metadata": null
} | ^6.25.0 | development |
babel-plugin-external-helpersEnvironment{
"local_name": "babel-plugin-external-helpers",
"alias": false,
"peer_metadata": null
} | ^6.22.0 | development |
babel-preset-envEnvironment{
"local_name": "babel-preset-env",
"alias": false,
"peer_metadata": null
} | ^1.5.2 | development |
rollupEnvironment{
"local_name": "rollup",
"alias": false,
"peer_metadata": null
} | ^0.43.0 | development |
rollup-plugin-babelEnvironment{
"local_name": "rollup-plugin-babel",
"alias": false,
"peer_metadata": null
} | ^2.7.1 | development |
rollup-plugin-commonjsEnvironment{
"local_name": "rollup-plugin-commonjs",
"alias": false,
"peer_metadata": null
} | ^8.0.2 | development |
rollup-plugin-node-resolveEnvironment{
"local_name": "rollup-plugin-node-resolve",
"alias": false,
"peer_metadata": null
} | ^3.0.0 | development |
rollup-plugin-uglifyEnvironment{
"local_name": "rollup-plugin-uglify",
"alias": false,
"peer_metadata": null
} | ^2.0.1 | development |
rollup-watchEnvironment{
"local_name": "rollup-watch",
"alias": false,
"peer_metadata": null
} | ^4.0.0 | development |
webrtc-adapterEnvironment{
"local_name": "webrtc-adapter",
"alias": false,
"peer_metadata": null
} | ^4.1.1 | peer |
Source distribution
{
"integrity": "sha512-hLyqBWaKUkE4sJvR3oNqC/l+6Vtnot1hejDIkNKebBbhowDkHK1yFaT5n7M7SJ5kLnCwpnj9DcC4n9IK++HRxQ==",
"shasum": "18b520fd451c4935ee14b8ed34876d4de0a635a6",
"tarball": "https://registry.npmjs.org/24-audio/-/24-audio-1.0.1.tgz",
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEQCIE4V/PhP7H42QOnfg9fbewnWug1OiU/zYStXP0+P99kZAiBLaGt9gqr9Gt3SEKteVhWZ42CAG8iYmwpZhb2zCtB7tw=="
}
]
}Observed since 20 Oct, 19:02 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:baf54d2ec51ee03a3a455a16bfe0613d708d7e3622edb2c0c3bb5aecfc519af5