GithubHelp home page GithubHelp logo

cedrickchee / rnnoise-nodejs Goto Github PK

View Code? Open in Web Editor NEW
21.0 3.0 5.0 181 KB

Node.js bindings to Xiph's RNNoise denoising C library

License: MIT License

JavaScript 0.93% Rust 99.07%
rnnoise audio-library noise-suppression deeplearning rnn keras-models nodejs-addon nodejs-library rust-bindings

rnnoise-nodejs's Introduction

rnnoise-nodejs

Build Status

Node.js bindings to Xiph's RNNoise denoising C library.

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.

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)

Development of component 1 and 3 is completed.

Install

Node.js versions supported: 8, 10

NPM

Use

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

We keep a rnnoise Git repo 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.

Copyright (c) 2020 Cedric Chee

rnnoise-nodejs's People

Contributors

cedrickchee avatar dependabot[bot] avatar

Stargazers

 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

rnnoise-nodejs's Issues

Error when installing

Hello @cedrickchee,

I'm trying to install this NPM module but I got this error when I ran npm i --save :

node-pre-gyp WARN Using needle for node-pre-gyp https download 
node-pre-gyp ERR! install error 
node-pre-gyp ERR! stack Error: 404 status code downloading tarball https://github.com/cedrickchee/rnnoise-nodejs/releases/download/0.1.8/node-v83-linux-x64.tar.gz
node-pre-gyp ERR! stack     at PassThrough.<anonymous> (/home/nowis/Documents/_CODE/jarvis-msbf-nlpjs/stt-srv/sandbox/DeepSpeech-examples/nodejs_wav/node_modules/rnnoise/node_modules/node-pre-gyp/lib/install.js:142:27)
node-pre-gyp ERR! stack     at PassThrough.emit (events.js:327:22)
node-pre-gyp ERR! stack     at ClientRequest.<anonymous> (/home/nowis/Documents/_CODE/jarvis-msbf-nlpjs/stt-srv/sandbox/DeepSpeech-examples/nodejs_wav/node_modules/needle/lib/needle.js:508:9)
node-pre-gyp ERR! stack     at Object.onceWrapper (events.js:422:26)
node-pre-gyp ERR! stack     at ClientRequest.emit (events.js:315:20)
node-pre-gyp ERR! stack     at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:641:27)
node-pre-gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
node-pre-gyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:509:22)
node-pre-gyp ERR! stack     at TLSSocket.emit (events.js:315:20)
node-pre-gyp ERR! stack     at addChunk (internal/streams/readable.js:309:12)
node-pre-gyp ERR! System Linux 5.8.0-41-generic
node-pre-gyp ERR! command "/home/nowis/.nvm/versions/node/v14.15.4/bin/node" "/home/nowis/Documents/_CODE/jarvis-msbf-nlpjs/stt-srv/sandbox/DeepSpeech-examples/nodejs_wav/node_modules/rnnoise/node_modules/.bin/node-pre-gyp" "install" "--update-binary" "--fallback-to-build=false"
node-pre-gyp ERR! cwd /home/nowis/Documents/_CODE/jarvis-msbf-nlpjs/stt-srv/sandbox/DeepSpeech-examples/nodejs_wav/node_modules/rnnoise
node-pre-gyp ERR! node -v v14.15.4
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok 
404 status code downloading tarball https://github.com/cedrickchee/rnnoise-nodejs/releases/download/0.1.8/node-v83-linux-x64.tar.gz
neon ERR! spawn cargo ENOENT

Error: spawn cargo ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
npm WARN [email protected] No repository field.
npm WARN [email protected] license should be a valid SPDX license expression

Is there any solution to fix it ?
Thanks :)

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.