Giter Club home page Giter Club logo

multiband_melgan's Introduction

Multi-Band MelGAN

Python 3.7 Hits

It's an naive implementation of Multi-band MelGAN: Faster Waveform Generation for High-Quality Text-to-Speech.

Goals

  • Comparable Quality with other vocoders
  • Mobile Inference Example

TODOs

  • Make inference code & example.
  • Enhance vocoder quality.

Prerequisite

  • install pytorch_sound
    • More detail about installation is on repository.
git clone -b v0.0.4 https://github.com/appleholic/pytorch_sound
cd pytorch_sound
pip install -e .
  • Preprocess vctk
    • After run it, you can find 'meta' directory in "OUT DIR"
    • Download Link
python pytorch_sound/scripts/preprocess.py vctk [VCTK DIR] [OUT DIR] [[Sample Rate: default 22.05k]]
  • Install multiband melgan
pip install -e .

Environment

  • Machine
    • pytorch 1.5.0
    • rtx titan 1 GPU / ryzen 3900x / 64GB
  • Dataset
    • VCTK

Train

python multiband_melgan/train_mb.py run [META DIR] [SAVE DIR] [SAVE PREFIX] [[other arguments...]]

Example

import torch
import librosa
from multiband_melgan.inferencer import Inferencer

# make inferencer
inf = Inferencer()

# load sample audio
sample_path = ''
wav, sr = librosa.load(sample_path, sr=22050)
wav_tensor = torch.FloatTensor(wav).unsqueeze(0).cuda()

# convert to mel
mel = inf.encode(wav_tensor)  # (N, Cm, Tm)

# convert back to wav
pred_wav = inf.decode(mel, is_denoise=True)  # (N, Tw)

Reference

Others

  • Model

    • multiband generator (22.05k) :
      • checkpoint file size : 6.6M
      • numb. parameters : 1710008
  • Audio Parameters

  • Sample Rate : 22.05k
  • Window Length & fft : 1024
  • Hop length : 256
  • Mel dim : 80
  • Mel min/max : 80 / 7600
  • Crop Size (in training) : 8192 samples

Author

Ilji Choi @appleholic

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.