Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/szastupov/raw-media-recorder

Record microphone audio to raw buffer
https://github.com/szastupov/raw-media-recorder

Last synced: 3 months ago
JSON representation

Record microphone audio to raw buffer

Awesome Lists containing this project

README

        

# Raw Media Recorder

Record audio from your microphone into AudioBuffer, useful when your browser (hi Safari 👋) doesn't support MediaRecorder or you don't want to decode from Opus.

## Install
``` yarn add raw-media-recorder ```

or

``` npm install raw-media-recorder ```

## Usage

```javascript
let recorder = new RawMediaRecorder(new AudioContext())
recorder.onstart = () => {
// Indicate recording, for example
// this.setState({ recording: true })
}
recorder.onstop = () => {
// On recording stoped, for example
// this.setState({ recording: false })
}
recorder.ondata = data => {
// Data recorder as AudioBuffer
}

// Start recording
recorder.start()

// Stop recording
recorder.stop()
```