Giter VIP home page Giter VIP logo

speech-denoising-wavenet's Introduction

A Wavenet For Speech Denoising

A neural network for end-to-end speech denoising, as described in: "A Wavenet For Speech Denoising"

Listen to denoised samples under varying noise conditions and SNRs here

Installation

It is recommended to use a virtual environment

  1. git clone https://github.com/drethage/speech-denoising-wavenet.git
  2. pip install -r requirements.txt
  3. Install pygpu

Currently the project requires Keras 1.2 and Theano 0.9.0, the large dilations present in the architecture are not supported by the current version of Tensorflow (1.2.0)

Usage

A pre-trained model (best-performing model described in the paper) can be found in sessions/001/models and is ready to be used out-of-the-box. The parameterization of this model is specified in sessions/001/config.json

Download the dataset as described below

Denoising:

Example: THEANO_FLAGS=optimizer=fast_compile,device=gpu python main.py --mode inference --config sessions/001/config.json --noisy_input_path data/NSDTSEA/noisy_testset_wav --clean_input_path data/NSDTSEA/clean_testset_wav

Speedup

To achieve faster denoising, one can increase the target-field length by use of the optional --target_field_length argument. This defines the amount of samples that are denoised in a single forward propagation, saving redundant calculations. In the following example, it is increased 10x that of when the model was trained, the batch_size is reduced to 4.

Faster Example: THEANO_FLAGS=device=gpu python main.py --mode inference --target_field_length 16001 --batch_size 4 --config sessions/001/config.json --noisy_input_path data/NSDTSEA/noisy_testset_wav --clean_input_path data/NSDTSEA/clean_testset_wav

Training:

THEANO_FLAGS=device=gpu python main.py --mode training --config config.json

Configuration

A detailed description of all configurable parameters can be found in config.md

Optional command-line arguments:

Argument Valid Inputs Default Description
mode [training, inference] training
config string config.json Path to JSON-formatted config file
print_model_summary bool False Prints verbose summary of the model
load_checkpoint string None Path to hdf5 file containing a snapshot of model weights

Additional arguments during inference:

Argument Valid Inputs Default Description
one_shot bool False Denoises each audio file in a single forward propagation
target_field_length int as defined in config.json Overrides parameter in config.json for denoising with different target-field lengths than used in training
batch_size int as defined in config.json # of samples per batch
condition_value int 1 Corresponds to speaker identity
clean_input_path string None If supplied, SNRs of denoised samples are computed

Dataset

The "Noisy speech database for training speech enhancement algorithms and TTS models" (NSDTSEA) is used for training the model. It is provided by the University of Edinburgh, School of Informatics, Centre for Speech Technology Research (CSTR).

  1. Download here
  2. Extract to data/NSDTSEA

speech-denoising-wavenet's People

Contributors

drethage avatar

Watchers

 avatar

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.