Skip to content

YongyuG/rnnoise_16k

Repository files navigation

RNNoise training for 16K audio

Notification

This project is refered to Dr.Jean-Marc Valin efforts from RNNoise: Learning Noise Suppression

References: Paper: A Hybrid DSP/Deep Learning Approach toReal-Time Full-Band Speech Enhancement

Original Github Repo: RNNoise Original Project

How to use

This project is done one year ago when I started doing NS things, so codes are not well organized. If you have any questions, feel free to ask.

This can code is able to accepct a directory of wav file for training rather than raw file.

Following the CMakeLists.txt for compiling the projcet The src/denoice.c is the main thing on modification from 48k -> 16k, and training/run.sh is how to train in 16k audio.

you also need to check src/compile.sh for compiling src directory,

Pay attention, I use src/denoise.c for feature extractions. src/denoise16.c is something that I did for experiments.

if you wanna use less frames or more frames for training, modify the main function variable count inside the src/denoise.c

The whole process is:

  • cd src
  • bash compile.sh which will generate binary for creating mix features and labels, use denoise.c inside compile.sh
  • ./src/denoise_training /data/speech_dir /data/noise_dir mixed.wav > training_16k_v3.f32 the mixed.wav is the raw file which you can check whether wavs have been mixed
  • python bin2hdf5.py training_16k_v3.f32 80000000 75 training_16k_v3.h5
  • python rnn_train_16k.py
  • python dump_rnn.py weights.hdf5 rnn_data.c rnn_data.rnnn name

Replace with new trained model

if you follow the instructions and training/run.sh, new rnn_data.c and rnn_data.h which are come from your new trained model will be generated. Replace the old rnn_data.c and rnn_data.h in src directory with the new one, using CMakeList.txt in the working directory,

  • cmake .
  • make

the binary file will be generated in bin directory, you can also change the name of your binary inside CMakeList.txt

The way to use binary file

Binary File <Input Noisy File> <Output Path>

e.g:

./bin/rnn_gao_new noisy.wav out.wav

About

implementation of rnnoise_16k

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages