GithubHelp home page GithubHelp logo

robbson / recorderjs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chris-rudmin/opus-recorder

0.0 1.0 0.0 3.88 MB

More flexibility for Recorderjs

License: Other

Makefile 6.13% HTML 19.13% JavaScript 74.73%

recorderjs's Introduction

Fork of Recorderjs

This is a fork of Chris Rudmin's version of Recorderjs. The project's primarily focus is to add additional features to the library which make it more flexible in specific scenarios (see below). For the original documentation just have a look on https://github.com/chris-rudmin/Recorderjs .

Basically there are two additional parameters for the Recorder constructor:

var recorder = new Recorder(config, existingStream, levelMeterCallback)

Passing an existing stream

The first one takes an existing input stream (from a microphone) so the recorder uses this one instead of creating its own. This is useful when you do something like an audio setup once before using Recorderjs. Because for each new stream instance that is using a system's microphone the user gets a dialog box asking if he wants to allow that access. Having this box multiple times is very annyoing. Except the user chooses to always allow access to the microphone.

Passing a level meter callback

This callback function is called several times a second to deliver the current audio level from the input stream. This is useful for some visual feedback to the user while recording so your application feels more responsive.

TODO: Reduce streaming latency & increase efficiency

When used as a streaming client the current implementation of the recorder delivers one Ogg page in a specific frequency that is based on the buffer configuration. Depending on your protocol stack (websockets, http POSTs etc.) you can deliver those chunks of compressed audio data to a server. This approach has two caveats:

  1. The first two pages consist only of the Ogg stream header and the Opus header with no audio data at all. This introduces an additional delay to your streaming application depending on your page delivery frequency.

  2. There is some overhead for each audio data chunk because of all the additional meta data of an Ogg page. This ratio of audio data vs Ogg overhead gets worse if you stream smaller chunks more frequently.

recorderjs's People

Contributors

chris-rudmin avatar mattdiamond avatar princemaple avatar lepinsk avatar gabriel-cardoso avatar jussi-kalliokoski avatar robbson avatar agrueneberg avatar cwilso avatar dontjee avatar rongduan-zhu avatar cleartribe avatar thomasboyt avatar tcyrus avatar vizv avatar fulldecent avatar xinbenlv avatar

Watchers

 avatar

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.