Giter Site home page Giter Site logo

segan-pytorch's Introduction

Pytorch Implementation of SEGAN (Speech Enhancement GAN)

Implementation of SEGAN by Pascual et al. in 2017, using pytorch. Original Tensorflow version can be found here.

Prerequisites

  • python v3.5.2 or higher
  • pytorch v0.4.0
  • CUDA preferred
  • noisy speech dataset downloaded from here
  • libraries specified in requirements.txt

Installing Required Libraries

pip install -r requirements.txt

Data Preprocessing

Use data_preprocess.py file to preprocess downloaded data. Adjust the file paths at the beginning of the file to properly locate the data files, output folder, etc. Uncomment functions in __main__ to perform desired preprocessing stage.

Data preprocessing consists of three main stages:

  1. Downsampling - downsample original audio files (48k) to sampling rate of 16000.
  2. Serialization - Splitting the audio files into 2^14-sample (about 1 second) snippets.
  3. Verification - whether it contains proper number of samples.

Note that the second stage takes a fairly long time - more than an hour.

Training

python model.py

Again, fix and adjust datapaths in model.py according to your needs. Especially, provide accurate path to where serialized data are stored.

Using Tensorboard

In order to use tensorboard, you need to first install tensorboard:

pip install tensorboard

Then run tensorboard by specifing the log directory.

tensorboard --logdir=segan_data_out/tblogs

segan-pytorch's People

Contributors

dansuh17 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.