forked from xiph/rnnoise
-
Notifications
You must be signed in to change notification settings - Fork 0
Recurrent neural network for audio noise reduction
License
shop668/rnnoise
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
RNNoise is a noise suppression library based on a recurrent neural network. A description of the algorithm is provided in the following paper: J.-M. Valin, A Hybrid DSP/Deep Learning Approach to Real-Time Full-Band Speech Enhancement, Proceedings of IEEE Multimedia Signal Processing (MMSP) Workshop, arXiv:1709.08243, 2018. https://arxiv.org/pdf/1709.08243.pdf An interactive demo is available at: https://jmvalin.ca/demo/rnnoise/ To compile, just type: % ./autogen.sh % ./configure % make Optionally: % make install Note that the autogen.sh script will automatically download the model files from the Xiph.Org servers, since those are too large to put in Git. While it is meant to be used as a library, a simple command-line tool is provided as an example. It operates on RAW 16-bit (machine endian) mono PCM files sampled at 48 kHz. It can be used as: ./examples/rnnoise_demo <noisy speech> <output denoised> The output is also a 16-bit raw PCM file. The latest version of the source is available from https://gitlab.xiph.org/xiph/rnnoise . The github repository is a convenience copy. == TRAINING == To train an RNNoise model, you need both clean speech data, and noise data. Both need to be sampled at 48 kHz, in 16-bit PCM format (machine endian). Assuming the files are called speech.pcm and noise.pcm, start by generating the training data with % ./dump_features speech.pcm noise.pcm features.f32 <count> where <count> is the number of sequences to process. The number of sequences should be at least 10000, but the more the better. To make the feature generation faster, you can use the script provided in script/dump_features_parallel.sh To use it: % script/dump_features_parallel.sh ./dump_features speech.pcm noise.pcm features.f32 <count> <nb_processes> which will run nb_processes processes, each for count sequences, and concatenate the output to a single file. Once the feature file is computed, you can start the training with: % python3 train_rnnoise.py features.f32 output_directory The training will produce .pth files, e.g. rnnoise_200.pth The next step is to convert the model to C files using: % python3 dump_rnnoise_weights.py --quantize rnnoise_200.pth rnnoise_c which will produce the rnnoise_data.c and rnnoise_data.h files in the rnnoise_c directory. Copy these files to src/ and then build RNNoise using the instructions above.
About
Recurrent neural network for audio noise reduction
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- C 99.8%
- Other 0.2%