speaker-calibration v2.2.186
Speaker-Calibration
Speaker-Calibration provides a simple API for performing speaker calibration in Javascript. The Library has minimal dependencies and is designed to be used in the browser.
Usage
<!-- index.html --->
...
<body>
...
<script src="https://unpkg.com/speaker-calibration@1.4.1/dist/main.js"></script>
</body>// speaker.js
// initialize the chosen calibrator with the paramters, or pass no paramters to use default settings
const calibrator = new ImpulseResponseCalibration({
numCaptures: 3,
numMLSPerCapture: 3,
download: false,
});
// pass the calibrator and speaker paramters to the startCalibration method (async)
const invertedIR = await Speaker.startCalibration(
{
siteUrl: window.location.href.substring(0, location.href.lastIndexOf('/')),
targetElementId: 'display',
},
calibrator
);// listener.js
window.listener = new speakerCalibrator.Listener({
targetElementId: 'display',
});UML Design

Impulse Response Calibration Logic

Contribution Guidelines
As of 07/29/2022
Initial Setup
git clone https://github.com/EasyEyes/speaker-calibration.gitcd speaker-calibrationnpm i
All outputs from the scripts/recipies below should be automatically placed in the /dist directory.
This is what will be served once the library is published.
Example
In /dist/example you will find a small example app that uses the speaker-calibration library.
Javascript
In package.json you will see some key scripts:
build:prodtells webpack to build the library in production mode, outputing to/distbuild:devtells webpack to build the library in development watch mode, outputing to/distbuild:dev:analyzetells webpack to build the library in development mode and open up a bundle analysis page. Helpful for viewing the size of the library, broken down by individual modules and/or dependencies.serve:devspins up anexpress.jsserver on port3000usingnodemon. It serves the/dist&/dist/examplefolders.build:wasmcalls the makefile recipe to clean, and rebuild the web assembly code (requires emscripten installed, more details below)lintrunseslinton all js files in the projectlint:fixlints and automatically fixes all js files in the project.build:docbuilds the documentation usingjsdoc. Outputs to/doc
Run (2) & (3) in seperate shell windows, with this setup you will be able to modify both the
library and front end examples with hot reload built in. Run (7) precommit to keep you code
standardized.
CPP/WASM
We are using Emscripten to compile the C++ code into a wasm file. Usage
requires the installation of the Emscriten compiler. Instructions can be found on their website. In
makefile you will see a few recipies:
mlsGen_bindcompiles the cpp files to wasm, generating a modularized javascript "glue" file, using embind. This is the current build targetmlsGen_modulecompiles the cpp files to wasm, generating a modularized javascript "glue" file.mlsGen_wasmcompiles the cpp file to a stand-alone wasm without a javascript "clue" file.cleancleans up and generated coderebuildcleans and rebuilds the output. Run this after making changes to the cpp files.
Documentation
We use jsdoc standards to document our library.
Linting
We use ESLint to lint our code and enforce best practices. We are currently using AirBnB's JavaScript Style Guide
Styling
We use Prettier to format our code.
Deployment
- Changes publshed to
mainwill automatically trigger a deploy on thenetlifyproject. This deployment is only relevant to theexampleapp, it will not make any changes to any others using the library. speaker-calibrationis library that is published to npm. This means that in order to make your changes 'live' a new version of the library needs to be published. Conveniently, there exists an npm package np which provides a lot of helpful abstractions and UI elements when dealing with npm.- Once a new version of the library is published, it is then live for anyone to use by bumping the version they're using up to the newest release.
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago