Giter VIP home page Giter VIP logo

lpcnet's Introduction

LPCNet

Low complexity WaveRNN-based speech coding by Jean-Marc Valin

Introduction

Work in progress software for researching low CPU complexity algorithms for speech compression by applying Linear Prediction techniques to WaveRNN. The goal is to reduce the CPU complexity such that high quality speech can be synthesised on regular CPUs (around 1 GFLOP).

The BSD licensed software is written in C and Keras and currently requires a GPU (e.g. GT1060) to run. For training models, a GTX 1080 Ti or better is recommended.

This software is also a useful resource as an open source starting point for WaveRNN-based speech coding.

Quickstart

  1. Set up a Keras system with GPU.

  2. In the src/ directory, run ./compile.sh to compile the data processing program.

  3. Then, run the resulting executable:

    ./dump_data input.s16 exc.s8 features.f32 pred.s16 pcm.s16
    

    where the first file contains 16 kHz 16-bit raw PCM audio (no header) and the other files are output files. The input file currently used is 6 hours long, but you may be able to get away with less (and you can always use ±5% or 10% resampling to augment your data).

  4. Now that you have your files, you can do the training with:

    ./train_lpcnet.py exc.s8 features.f32 pred.s16 pcm.s16
    

    and it will generate a wavenet*.h5 file for each iteration. If it stops with a "Failed to allocate RNN reserve space" message try reducing the batch_size variable in train_wavenet_audio.py.

  5. You can synthesise speech with:

 ./test_lpcnet.py features.f32 > pcm.txt

The output file pcm.txt contains ASCII PCM samples that need to be converted to WAV for playback

Speech Material for Training

Suitable training material can be obtained from the McGill University Telecommunications & Signal Processing Laboratory. Download the ISO and extract the 16k-LP7 directory, the src/concat.sh script can be used to generate a headerless file of training samples.

cd 16k-LP7
sh ~/CELP/src/concat.sh

Reading Further

  1. If you're lucky, you may be able to get the current model at: https://jmvalin.ca/misc_stuff/lpcnet_models/

  2. WaveNet and Codec 2

lpcnet's People

Contributors

jmvalin avatar drowe67 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.