0.0.19 • Published 7 years ago

@bigear/microphone-recorder v0.0.19

Weekly downloads
94
License
ISC
Repository
github
Last release
7 years ago

microphone-recorder

It is a lib for sound recording on HTML, implemented by audioContext and webWorker

npm-img npm-url

nodei.co

Install

$ npm install --save @bigear/microphone-recorder

Demo

Github: https://github.com/vue-exp-lab/vue-sound-streaming/blob/master/src/pages/MicAudioContext.vue

Usage

import Recorder from "@bigear/microphone-recorder";


navigator.mediaDevices.getUserMedia({ audio: true }).then((mediaStreamObject) => {
    const input = audio_context.createMediaStreamSource(mediaStreamObject);

    const recorder = new Recorder(input);
    recorder.record();

    // speak for a bit
    recorder.stop();
    recorder.exportWAV("audio/wav", function(blob) {
        // append the audio blob to html element
        const url = URL.createObjectURL(AudioBLOB);
        const au = document.querySelector("audio");
        au.controls = true;
        au.src = url;
        recorder.clear();
    });
})
0.0.19

7 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago