Giter VIP home page Giter VIP logo

segan-docker's Introduction

SE-FFTNet in a handy Docker container

This is a small repo to make it easier to use SE-FFTNet to clean up audio samples. It wraps the model in Docker, takes in noisy WAV files and outputs cleaned up WAVs.

Requirements:

  • Linux (currently, until CUDA for WSL2 is released)
  • Docker & Nvidia-docker (tested on 19.03.6)

The container follows the requirements of SEGAN. Ideally this would use a Tensorflow Docker image but there are some issues in getting this to run. Instead, it is built on an NVidia CUDA image, specificially this one.

We also need to use the weights provides by SEGAN - you can find these here. These should be unzipped, with segan_v1.1 being placed in a directory called weights. This should be in the directory you build the container from, with the directory structure looking something like this:

SEGAN-Docker/
├── build_gpu.dockerfile
├── repositories/
│   ├── ...
├── weights/
│   ├── segan_v1.1
│   |   ├── SEGAN-41700.data-00000-of-00001
│   |   ├── SEGAN-41700.index
│   |   ├── SEGAN-41700.meta
├── segan/
│   ├── ...

Input and Output

Create two local directories - one for input, one for output. You will need to mount these when you run the container. It should look something like this:

output/
input/
├── input_file_1.wav
├── input_file_2.wav
├── input_file_3.wav

If you are happy to mount from your clone of this repo, for example, you could use /path/to/repo/segan/input/ and /path/to/repo/segan/output/, and your SEGAN-Docker directory may look like this:

SEGAN-Docker/
├── build_gpu.dockerfile
├── output/
├── input/
│   ├── input_file_1.wav
│   ├── input_file_2.wav
│   ├── input_file_3.wav
├── repositories/
│   ├── ...
├── weights/
│   ├── segan_v1.1
│   |   ├── SEGAN-41700.data-00000-of-00001
│   |   ├── SEGAN-41700.index
│   |   ├── SEGAN-41700.meta
├── segan/
│   ├── ...

Note: Ensure that output does not contain a file with the same name as whatever you pass as input, or SEGAN may fail to save the file.

Building and Running the Container

You can build with:

docker build -t segan:<version number> -f build_gpu.dockerfile .

Put the files you wish to convert in input, ensuring they are sampled at 16 KHz. Then run the container, mounting it as below and giving the name of a file for processing <input file name> in the input directory:

docker container run --runtime=nvidia -v <local input path>:/segan/input/ -v <local output path>:/segan/test_clean_results/ -e input_file=<input file name> segan:<version number>

segan-docker's People

Contributors

tangohead avatar

Watchers

James Cloos avatar  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.