Git Product home page Git Product logo

lpctron's Introduction

LPCTron

Tacotron2 + LPCNET for complete End-to-End TTS System

Thanks to https://github.com/MlWoo/ for most of changes ( Check this issue Also MlWoo/LPCNet#4)

Prerequisites

librosa , tqdm , matplotlib, lws , unidecode , inflect, falcon, scipy , numpy, keras

sudo apt-get install python-pyaudio sudo apt-get install portaudio19-dev

Quick Run

Checkout the LPCTron , and run tts.sh it converts text_file ( Tacotron2/text.txt ) to test.wav

Steps of Integration

Training Tacotron2 specially to be used by LPCNET vocoder ( Instead of Wavenet Vocoder)

python3 preprocess.py --base_dir /media/alok/ws/sandbox/lpc_tacatron2/dataset --dataset LJSpeech-1.1

this will generate /dataset/training_data folder

├── training_data (1)
│   ├── audio (*)
│   ├── linear
│   └── mels
    └── train.txt

*all three folder contain npy array, train.txt contains text for each audio.
  • this is replaced by script for training to be used by LPCNET

Training LPCNET with LJPSpeech

Since Tacatron2 is trained with LPSpeech its good idea to train with Same data. LPCNET uses a single Merged PCM for training. So you need to remove wav headers from each file and merge them for training.

===============================================================================

sudo apt-get install python3-tk

pip3 install lws --user

python -m pip uninstall pip && sudo apt install python3-pip --reinstall

python3 train.py --input_dir ../dataset/training_data --tacotron_input ../dataset/training_data/train.txt --model='Tacotron'

python3 synthesize.py --model='Tacotron' --mode='eval'

sudo apt-get install python3-tk

pip3 install lws --user python -m pip uninstall pip && sudo apt install python3-pip --reinstall

Download https://jmvalin.ca/misc_stuff/lpcnet_models/lpcnet15_384_10_G16_100.h5

apt-get install -y google-perftools LD_PRELOAD = /usr/lib/x86_64-linux-gnu/libtcmalloc.so.4

python3 train.py --input_dir ../dataset/training_data --tacotron_input ../dataset/training_data/train.txt --model='Tacotron'

python3 synthesize.py --model='Tacotron' --mode='eval'

./test_lpcnet f32_for_lpcnet.f32 test.s16

ffmpeg -f s16le -ar 16k -ac 1 -i test.s16 test-out.wav

lpctron's People

Contributors

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