NVIDIA WaveGlow Documentation

repository·master·Indexed 25 days ago

https://github.com/nvidia/waveglow

A flow-based generative network for high-quality, fast, and efficient speech synthesis from mel-spectrograms without requiring auto-regression. Includes instructions for environment setup, audio generation using pre-trained models, and training new models from scratch using the LJ Speech Data.

Tokens
627
Snippets
3
Records
3
Agent score
31%

What's inside WaveGlow

  1. Generate audio with a pre-existing model

    master

    To generate audio using a pre-trained WaveGlow model, follow these steps:

    1. Download the published model.
    2. Download the mel-spectrograms.
    3. Run inference.py using the following command structure:
    python3 inference.py -f <(ls mel_spectrograms/*.pt) -w waveglow_256channels.pt -o . --is_fp16 -s 0.6

    Note: If you are using older models, use convert_model.py to convert them to the current format with fused residual and skip connections.

  2. Setup WaveGlow

    master

    To set up the WaveGlow environment, clone the repository, initialize submodules, and install the necessary Python dependencies and NVIDIA Apex.

    1. Clone the repo and initialize submodules:
      git clone https://github.com/NVIDIA/waveglow.git
      cd waveglow
      git submodule init
      git submodule update
    2. Install requirements:
      pip3 install -r requirements.txt
    3. Install Apex.
    git clone https://github.com/NVIDIA/waveglow.git
    cd waveglow
    git submodule init
    git submodule update
  3. Train your own WaveGlow model

    master

    Follow these steps to train a new WaveGlow model from scratch:

    1. Prepare Data: Download the LJ Speech Data and place it in the data/ directory.
    2. Create File Lists: Generate lists of filenames for training and testing:
      ls data/*.wav | tail -n+10 > train_files.txt
      ls data/*.wav | head -n10 > test_files.txt
    3. Train: Create a checkpoints directory and run train.py with your configuration file:
      mkdir checkpoints
      python train.py -c config.json
      • Multi-GPU Training: Use distributed.py instead of train.py. This is tested with single node and NCCL.
      • Mixed Precision: Set "fp16_run": true in your config.json to enable mixed precision training.
    4. Generate Test Mel-Spectrograms: After training, create mel-spectrograms for your test set:
      python mel2samp.py -f test_files.txt -o . -c config.json
    5. Inference: Run inference on your newly trained network:
      ls *.pt > mel_files.txt
      python3 inference.py -f mel_files.txt -w checkpoints/waveglow_10000 -o . --is_fp16 -s 0.6
    mkdir checkpoints
    python train.py -c config.json