npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ennuicastr/libspecbleach.js

v0.1.7-js2

Published

Port of libspecbleach to WebAssembly/JavaScript

Downloads

9

Readme

NOTE: This is a port of libspecbleach to WebAssembly/JavaScript, not the original libspecbleach!

NOTE 2: This package is under the GNU GENERAL PUBLIC LICENSE. It is not under the GNU LESSER General Public License. If you want a version under a more permissive license, you will have to negotiate with the authors of FFTW and/or libspecbleach. This is just a port!

libspecbleach.js

Load libspecbleach-<version>.js. If you're loading from a directory other than ., then first create a global variable LibSpecBleach and set its base field to the directory you're loading it from. You can also set the nowasm and/or nosimd fields of LibSpecBleach to prevent loading these features.

After loading libspecbleach.js, LibSpecBleach.LibSpecBleach is a factory function that returns a promise that resolves to an instance of the SpecBleach library.

The result of LibSpecBleach.LibSpecBleach() can be used exactly like the C libspecbleach library. Use specbleach.calloc_f32(size) to allocate a Float32Array in the context of the LibSpecBleach instance; it returns an array with the pointer (needed for C function calls) and the Float32Array. Make sure to use specbleach.free to free it when you're done. Otherwise, the library is identical to the original libspecbleach, except (a) functions that take SpecBleachParameters instead have versions suffixed with _js that take SpecBleachParameter *s, and (b) the specbleach_ prefix is removed from all functions, except for specbleach_free.

Alternatively, libspecbleach.js has an object oriented API.

See examples/denoise_demo.js and examples/adenoise_demo.js for examples of the C API. See examples/denoise_demo_oo.js and examples/adenoise_demo_oo.js for examples of the OO API.

The remainder of this document is the original libspecbleach's README, and is not JavaScript-specific.

libspecbleach

C library for audio noise reduction and other spectral effects

build

Background

This library is based on the algorithms that were used in noise-repellent. These were extracted into a this standalone library to remove the lv2 dependency. It was design to be extensible and modular. It uses the concept of a spectral processor which itself uses a short time Fourier transform (STFT) to process the audio. There are two initial processors in place, one which uses the adaptive part of noise repellent and one that uses the manual capturing profile based denoising. The library could be extended with more spectral processors using any STFT-based algorithm such as de-crackle, de-click and other audio restoration algorithms.

De-noise algorithms

There several techniques implemented in the library that are being used in the denoisers, such as masking thresholds estimation, onset detectors, etc. All these are being used in conjunction to improve the very basic spectral substraction algorithm. Most of the papers used are listed in the wiki of the project. Also a block diagram is provided to explain the reduction architecture.

Build

If you wish to compile yourself and install the library you will need the a C compiling toolchain, Meson build system, ninja compiler, git and fftw3 library.

Installation:

  git clone https://github.com/lucianodato/noise-repellent.git
  cd noise-repellent
  meson build --buildtype=release --prefix=/usr --libdir=lib (your-os-appropriate-location-fullpath)
  meson compile -C build -v
  sudo meson install -C build

Example

Simple console apps examples are provided to demonstrate how to use the library. It needs libsndfile to compile successfully. You can use them as follows:

Adaptive noise learn

  adenoise_demo <input file name> <output file name>

Manual noise learn

  denoise_demo <input file name> <output file name>

It will recognize any libsndfile supported format.