Git Product home page Git Product logo

wavebell's Introduction

wavebell

Build Status Coverage Status npm

Catch realtime audio wave from microphone with JavaScript!

Screenshot

wavebell waveform

Installation

# Install with npm
npm install --save wavebell
# Install with yarn
yarn add wavebell

Example

var bell = new WaveBell();

bell.on('wave', function (e) {
  // draw oscilloscope
  drawColumn(e.value);
});

bell.on('stop', function () {
  var blob = bell.result;
  // play recorded audio
  playback(URL.createObjectURL(blob));
});

// 25 frames per second
bell.start(1000 / 25);

Notice

In Chrome 47 or above, getUserMedia requires HTTPS to work. So it'd be better to setup SSL for your server.

Thanks

License

The MIT License.

wavebell's People

Contributors

skylerlee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

wavebell's Issues

Catching blocked audio

Is there a way to catch a situation, when audio device is not accessible due to user block?
Tried .on('error',...), .on('err',...) and try { bell.start() } catch (...) {...}, but none of them seems to work.

I'm trying to work with that in React, so error could be kind of confusing.
image

Oh, I see, that you don't catch that (recorder.js:52).

Canvas does not show on iOS 12

Hi, thank you for sharing this!
I've experimented with your implementation on mobile devices. Android (Chrome) works fine, but the canvas does not render on the latest iOS version. Did you notice this as well?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.