https://github.com/cedrickchee/rnnoise-nodejs
Node.js bindings to Xiph's RNNoise denoising C library
https://github.com/cedrickchee/rnnoise-nodejs
audio-library deeplearning keras-models nodejs-addon nodejs-library noise-suppression rnn rnnoise rust-bindings
Last synced: 8 months ago
JSON representation
Node.js bindings to Xiph's RNNoise denoising C library
- Host: GitHub
- URL: https://github.com/cedrickchee/rnnoise-nodejs
- Owner: cedrickchee
- License: mit
- Created: 2020-02-11T04:25:04.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-02T19:36:53.000Z (about 2 years ago)
- Last Synced: 2025-05-07T20:39:13.336Z (8 months ago)
- Topics: audio-library, deeplearning, keras-models, nodejs-addon, nodejs-library, noise-suppression, rnn, rnnoise, rust-bindings
- Language: Rust
- Size: 177 KB
- Stars: 24
- Watchers: 3
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rnnoise-nodejs
[](https://travis-ci.com/cedrickchee/rnnoise-nodejs)
Node.js bindings to Xiph's [RNNoise denoising C library](https://github.com/xiph/rnnoise/).
[RNNoise](https://people.xiph.org/~jm/demo/rnnoise/) is a project showing how deep learning (Recurrent Neural Networks/RNNs) can be applied to noise suppression.
**Announcement**
Jan 2021:
>
> I have been working on a new project that will bring this technology to you. A sneak peak at the new deep noise suppression and source separation model and audio output quality:
>
> [Watch on YouTube](https://youtu.be/_-GoGJSE8q0).
>
> This is the 2020 state-of-the art noise suppression for **real-time** and offline use-cases. It works best in real-world environment where the background noise is low to medium. Of course it is not working well in super noisy environment like construction site. The model is suitable for many work-from-home environments such as home or cafe. We're currently working to bring this technology to desktop app for Mac OSX and Ubuntu (linux). Programming language SDK for Node.js and Go is also in the work. REST API is available (upon request) for integration with other use-cases.
Feb 2021:
> The new project has 3 components:
> 1. PyTorch deep learning model
> 2. Node.js bindings for the PyTorch traced (JIT) model in C++
> 3. [JavaScript port of PyTorch C++ library (libtorch)](https://github.com/cedrickchee/tch-js)
>
> Development of component 1 and 3 is completed.
## Install
Node.js versions supported: 8, 10
[](https://nodei.co/npm/rnnoise/)
## Use
```javascript
const rnnoise = require("rnnoise");
const denoisedBufLength = rnnoise.suppress(
"babble_15dB.wav",
"babble_15dB_dn.wav"
);
console.log(`Denoised buffer length: ${denoisedBufLength} bytes`);
```
---
## API
### Noise Suppression Functions
**rnnoise.suppress(input: string, output: string)**
**suppress** operates on 16-bit RAW audio format (machine endian) mono PCM files sampled at 48 kHz. The output is also a 16-bit RAW PCM file.
- `input` is a required string of the path to RAW PCM file input.
- `output` is a required string of the path to output RAW PCM file.
## Developer
**Working on project with [submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules)**
We keep a [rnnoise Git repo](https://github.com/xiph/rnnoise/) as a subdirectory in this Git repo. So, please clone this repo by using Git submodule:
```
git clone --recursive https://github.com/cedrickchee/rnnoise-nodejs.git
```
---
Expand License
The code in this repository, including all code samples, is released under the [MIT license](LICENSE).
Copyright (c) 2020 Cedric Chee