Metadata-Version: 2.1
Name: diffwave
Version: 0.1.5
Summary: diffwave
Home-page: https://www.lmnt.com
Author: LMNT, Inc.
Author-email: github@lmnt.com
License: Apache 2.0
Description: # DiffWave
        ![PyPI Release](https://img.shields.io/pypi/v/diffwave?label=release) [![License](https://img.shields.io/github/license/lmnt-com/diffwave)](https://github.com/lmnt-com/diffwave/blob/master/LICENSE)
        
        DiffWave is a fast, high-quality neural vocoder and waveform synthesizer. It starts with Gaussian noise and converts it into speech via iterative refinement. The speech can be controlled by providing a conditioning signal (e.g. log-scaled Mel spectrogram). The model and architecture details are described in [DiffWave: A Versatile Diffusion Model for Audio Synthesis](https://arxiv.org/pdf/2009.09761.pdf).
        
        ## Status (2020-09-27)
        - [x] stable training
        - [x] high-quality synthesis
        - [x] mixed-precision training
        - [x] multi-GPU training
        - [x] command-line inference
        - [x] programmatic inference API
        - [x] PyPI package
        - [ ] audio samples
        - [ ] pretrained models
        
        Big thanks to [Zhifeng Kong](https://github.com/FengNiMa) (lead author of DiffWave) for pointers and bug fixes.
        
        ## Audio samples
        ...coming soon...
        
        ## Pretrained models
        ...coming soon...
        
        ## Install
        
        Install using pip:
        ```
        pip install diffwave
        ```
        
        or from GitHub:
        ```
        git clone https://github.com/lmnt-com/diffwave.git
        cd diffwave
        pip install .
        ```
        
        ### Training
        Before you start training, you'll need to prepare a training dataset. The dataset can have any directory structure as long as the contained .wav files are 16-bit mono (e.g. [LJSpeech](https://keithito.com/LJ-Speech-Dataset/), [VCTK](https://pytorch.org/audio/_modules/torchaudio/datasets/vctk.html)). By default, this implementation assumes a sample rate of 22.05 kHz. If you need to change this value, edit [params.py](https://github.com/lmnt-com/diffwave/blob/master/src/diffwave/params.py).
        
        ```
        python -m diffwave.preprocess /path/to/dir/containing/wavs
        python -m diffwave /path/to/model/dir /path/to/dir/containing/wavs
        
        # in another shell to monitor training progress:
        tensorboard --logdir /path/to/model/dir --bind_all
        ```
        
        You should expect to hear intelligible (but noisy) speech by ~8k steps (~1.5h on a 2080 Ti).
        
        #### Multi-GPU training
        By default, this implementation uses as many GPUs in parallel as returned by [`torch.cuda.device_count()`](https://pytorch.org/docs/stable/cuda.html#torch.cuda.device_count). You can specify which GPUs to use by setting the [`CUDA_DEVICES_AVAILABLE`](https://developer.nvidia.com/blog/cuda-pro-tip-control-gpu-visibility-cuda_visible_devices/) environment variable before running the training module.
        
        ### Inference API
        Basic usage:
        
        ```python
        from diffwave.inference import predict as diffwave_predict
        
        model_dir = '/path/to/model/dir'
        spectrogram = # get your hands on a spectrogram in [N,C,W] format
        audio, sample_rate = diffwave_predict(spectrogram, model_dir)
        
        # audio is a GPU tensor in [N,T] format.
        ```
        
        ### Inference CLI
        ```
        python -m diffwave.inference /path/to/model /path/to/spectrogram -o output.wav
        ```
        
        ## References
        - [DiffWave: A Versatile Diffusion Model for Audio Synthesis](https://arxiv.org/pdf/2009.09761.pdf)
        - [Denoising Diffusion Probabilistic Models](https://arxiv.org/pdf/2006.11239.pdf)
        - [Code for Denoising Diffusion Probabilistic Models](https://github.com/hojonathanho/diffusion)
        
Keywords: diffwave machine learning neural vocoder tts speech
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Libraries
Description-Content-Type: text/markdown
